amit170394 / sardine

Automatically exported from code.google.com/p/sardine
0 stars 0 forks source link

return getStatusCode() from put #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the recommedation?
1. do a put
2. void is the return type
3. no response to know whether it was successful 200/201 or otherwise

What is the expected output? What do you see instead?
It would be nice (like using the httpclient directly) if doing a put
returned the same info.

What version of the product are you using? On what operating system?
73 solaris

Please provide any additional information below.
pretty straight forward really - thanks for the work you have put in so
far, your project is definately useful.

Original issue reported on code.google.com by mr.ian.w...@gmail.com on 25 Feb 2010 at 12:52

GoogleCodeExporter commented 9 years ago
Hi Ian, 

The default is success. If you get anything other than a 200-299 range 
response, you will get a SardineException which contains 
all the information you need. I'm trying to keep the API super simple so I 
don't really want to create another object to deal with 
return values when 99% of the use cases don't need them (it either succeeds or 
fails).

I can see making a change to only check put for 200/201 and throw an exception 
otherwise, but if you would like more 
information from PUT, then use HttpClient directly. =)

thanks,

jon

Original comment by latch...@gmail.com on 25 Feb 2010 at 1:18

GoogleCodeExporter commented 9 years ago
fair enough.

once again thanks for the project.

Original comment by mr.ian.w...@gmail.com on 26 Feb 2010 at 4:34

GoogleCodeExporter commented 9 years ago
Ok, I'm going to close this now. =)

Original comment by latch...@gmail.com on 26 Feb 2010 at 5:22