tagged [http]

What is "406-Not Acceptable Response" in HTTP?

What is "406-Not Acceptable Response" in HTTP? In my Ruby on Rails application I tried to upload an image through the POSTMAN [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer) clien...

How to redirect to a 404 in Rails?

How to redirect to a 404 in Rails? I'd like to 'fake' a 404 page in Rails. In PHP, I would just send a header with the error code as such: How is that done with Rails?

How to get the file size from http headers

How to get the file size from http headers I want to get the size of an http:/.../file before I download it. The file can be a webpage, image, or a media file. Can this be done with HTTP headers? How ...

23 Mar at 18:40

PHP, cURL, and HTTP POST example?

PHP, cURL, and HTTP POST example? Can anyone show me how to do a PHP cURL with an HTTP POST? I want to send data like this: To `www.example.com` I expect the cURL to return a response like `result=OK`...

16 Jan at 22:38

Http verb of current http context

Http verb of current http context How do you find the http verb (POST,GET,DELETE,PUT) used to access your application? Im looking [httpcontext.current](http://msdn.microsoft.com/en-us/library/system.w...

How do I get the HTTP status code with jQuery?

How do I get the HTTP status code with jQuery? I want to check if a page returns the status code 401. Is this possible? Here is my try, but it only returns 0.

What are all the possible values for HTTP "Content-Type" header?

What are all the possible values for HTTP "Content-Type" header? I have to validate the `Content-Type` header value before passing it to an HTTP request. Is there a specific list for all the possible ...

When do you use POST and when do you use GET?

When do you use POST and when do you use GET? From what I can gather, there are three categories: 1. Never use GET and use POST 2. Never use POST and use GET 3. It doesn't matter which one you use. Am...

17 Jan at 20:23

400 BAD request HTTP error code meaning?

400 BAD request HTTP error code meaning? I have a JSON request which I'm posting to a HTTP URL. Should this be treated as `400` where `requestedResource` field exists but `"Roman"` is an invalid value...

Checking if a website is up via Python

Checking if a website is up via Python By using python, how can I check if a website is up? From what I read, I need to check the "HTTP HEAD" and see status code "200 OK", but how to do so ? Cheers ##...