This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have my app working where my Client can request a JSON object from the server and parses it fine.
Now , I want to build a JSON object on the client side so how do I send this to the server?
I have a HttpClient, A HttpPost and a JSON object, but could any show me how to "stuff" the JSON object into the POST request's body ( If that's the word ) ?
Thanks for reply.
Still having problems on client side though.
Here is my code so far
Problem is the first call hits my POST handler on the server side but when I try to add an entity the call never reaches the server side. No exceptions thrown on client side. Is adding an entity to the HttpPost the correct way to do this?
I am facing a related issue and I am wondering if you found the solution to your problem?
My problem is more related to finding and invoking the correct MessageBodyReader and I believe the problem is on my server side, but I am not 100% certain. Your message title perfectly describes the client-side of what I am doing.
We got around the initial problem. It was to do with the method signatures on the server side. We had a @POST handler which we couldn't figure out why it was not being called but the problem was our method signature didn't take a "Representation" object !!
Anyways we have ditiched out REST solution for the time being and going with an RPC solution first. Very easy to implement in comparison but we defo indend to plug in a REST solution later on this year when we get some proof of concepts ironed out.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How do I send a JSON object from the client to the server in a POST request?