wood burning stoves 2.0*
The moose likes Java in General and the fly likes HTTP post Json Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "HTTP post Json" Watch "HTTP post Json" New topic

HTTP post Json

Mark Hughes
Ranch Hand

Joined: Jul 14, 2006
Posts: 146
Hi Eveyone,

Im using HttpURLConnection to do simple HTTP post and get, I know i can add parameters to the connection using DataOutputStream.writeBytes() for the post but this does not work if i try and send JSON type text. What can i use in java to send JSON HTTP post's.

Mark Hughes
Mark Hughes
Ranch Hand

Joined: Jul 14, 2006
Posts: 146
Hi Guys, Sorry i got it working, it was a problem on the server side and not with my code at all.

Alexander Weicht

Joined: Apr 04, 2011
Posts: 1
hello Mark,

I have the same problem like you had. I dont yet know how to modify the json-String, so that I can post it. Please could you send me some code lines?

Best Regards!

wood burning stoves
subject: HTTP post Json
Similar Threads
Sending a jason object via Post
passing response as json vs. string array
Visual basic forms as presentation layer
How do I send a JSON object from the client to the server in a POST request?
How to pass JSON Object to another window using window.open