This project is read-only.


Crash on HTTPPost


I have try your code but there are no error management in HTTPPost .
If the server send an error message, the software crashes.
For example, if you use "DotNetSquare.NetSquare.VenueAdd" method and if the "venue" allready exists FourSquare send error 400 and the HTTPPost method crashes on the line "response = (HttpWebResponse)request.GetResponse();"
I have add a try{} catch{} but it is better if the HTTPost returns a result execution value (true or false) and if it is possible to get the error code.
Closed Dec 28, 2011 at 6:41 PM by Kev_MacD


Kev_MacD wrote Dec 28, 2011 at 6:41 PM

I have looked at this, and have determined that using a try/catch as you have done is the best solution. You get the WebException and your client can best decide how to handle.

wrote Dec 28, 2011 at 6:41 PM

wrote Feb 14, 2013 at 12:05 AM

wrote May 16, 2013 at 5:32 AM