Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sending JSON and another parameter in HTTPPost  RSS feed

Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edit: My way of sending the parameters was correct, on the browser the petition was a Get and the answer was different.

I need to do a POST call like this{"changePrice":"33"}

I've tried the url directly on a browser and it works

but doing this on a Java application behaves differently

I've tried encoding the entire URL and I get an error about the host not being blank.
I think the error is on the updates parameter only, but no clue where and why.

I know there are lots os similar cases, but those cases only send one parameter, the JSON, here I must send the JSON and the token separately


Google-GSON 2.2.2
apache httpclient 4.2.3
Willie Smits increased rainfall 25% in three years by planting trees. Tiny ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!