We’re using Flask for one of our API’s and I was just wondering if anyone knew how to return a HTTP response 201? For errors such as 404 we...
I read about Pragma header on Wikipedia which says: “The Pragma: no-cache header field is an HTTP/1.0 header intended for use in requests. It is a means for the...
For returning from a Web API 2 controller, I can return content with the response if the response is OK (status 200) like this: public IHttpActionResult Get() { string...
I’m trying to return a status code of 304 not modified for a GET method in a web api controller. The only way I succeeded was something like this:...
I have created the following function for checking the connection status: private void checkConnectionStatus() { HttpClient httpClient = new DefaultHttpClient(); try { String url = "http://xxx.xxx.xxx.xxx:8000/GaitLink/" + strSessionString +...
I have been developing with WebApi and have moved on to WebApi2 where Microsoft has introduced a new IHttpActionResult Interface that seems to recommended to be used over returning...
So, one can attempt to fetch the following JSON object: $ curl -i -X GET http://echo.jsontest.com/key/value/anotherKey/anotherValue HTTP/1.1 200 OK Access-Control-Allow-Origin: * Content-Type: application/json; charset=ISO-8859-1 Date: Wed, 30 Oct 2013...