6
I’m using the Jetty Client
to request a API Web
, until recently everything was ok, but I felt the need to send data via POST.
Problem
In the documentation of Jetty says that POST request data should be passed by the method param("chave", "valor")
, however the data is being passed via query-string
Request r = client.POST(url).param("access_token", accessToken);
The request is being in this format:
api.web.com/? access_token=1727020009.2da29da.ed9bdd6cc095430e8f1640bbeeas
I also checked the message by wireshark
Has anyone ever come across this problem?
How do you know that it is formatting this value?
– Maicon Carraro
I used System.out.print
– user6406
But did you ever run the request and check on the network whether it is being sent as a query string or not? Because this can be formatting when showing
– Maicon Carraro
I just auditioned with the wireshark, and edited the question.
– user6406
Give a system out in its variable "url" and show how it is
– Maicon Carraro
"http://api.instagram.com/"
– user6406
In your image was added "/v1/users/self/feed", it can be the redirect that is done automatically by Jetty, Instagram itself redirects you and plays for querystring. Try it on another site.
– Maicon Carraro
no no, it was that I tried to omit the url at the beginning of the question.... but the url is correct
– user6406
Like I said, you tried it on another site to see if I persisted?
– Maicon Carraro