java - PostMethod/HttpClient -


i need make http post request below url url parameters along xml. trying below code , not able proper response back.

url - https://mytest.com?z=123&b=abc&c=%10  xml - <test>         <data> test xml </data>       </test>  public string getresponse(string xml) {      httpclient client = new httpclient();     string url="https://mytest.com";     postmethod pmethod = new pmethod(url);     pmethod.addparameter("z","123");     pmethod.addparameter("b","abc");     pmethod.addparameter("c","%10");     post.setrequestentity(new stringrequestentity(xml, "application/xml", "utf-8"));     client.executemethod(pmethod); } 

please elaborate kind of response expecting? if facing problem in sending xml string given url may send xml string through post method in java you.


Comments

Popular posts from this blog

php - How can an email be returned from Stripe Checkout? -

SQL php on different pages to Insert (mysqli) -

linked list - Get the index of the Node in a LinkedList which contains the given value in java -