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
Post a Comment