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

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -