Hi I'm creating a simple HTTP client and Server that supports GET and PUT requests. For the client side I'm using a DataOutputStream to send the request and the file for a PUT request. I'm having trouble retrieving this on the server side though. I attempted to use a BufferedReader and I read the first line of the response, and then I open a DataInputStream and try to read the file but it's not working. Is this the wrong approach for implementing a PUT request? The GET is working great. If anyone has any ideas or could point to some resource I'd appreciate it.
I haven't done PUT but here's my code for POST. It's called after reading the headers to a blank line if the verb is post and it is not multi-part. It relies on the content size header which works in my environment but may not be safe in the real world:
Is PUT significantly different?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop