Issue
Boss wants us to send a HTTP GET with parameters in the body. I can't figure out how to do this using org.apache.commons.httpclient.methods.GetMethod or java.net.HttpURLConnection;.
GetMethod doesn't seem to take any parameters, and I'm not sure how to use HttpURLConnection for this.
Solution
HTTP GET method should NEVER have a body section. You can pass your parameters using URL query string or HTTP headers.
If you want to have a BODY section. Use POST or other methods.
Answered By - Loc
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.