The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
44 views

Response Header for illegal file (format)

I have a simple upload-servlet and need to report if a file is illegal and has not been added. For some reason i am not allowed to give a html-body back, so i need to use the response-header. ...
1
vote
0answers
22 views

Rendering head :ok vs head :no_content. Any good practices?

Whenever I take in data and do something like delete a post, etc. I generally return head :no_content. For example: def destroy @post = Post.find_by(external_id: params[:post_id]) @post.destroy! ...
1
vote
1answer
166 views

How to respond with error message when making AJAX calls

I have an app that wasn't written by myself. If there is an error such as an invalid ID given as a parameter, I would return something like: (200 code) { "success": 0, "error": "The row ...
-3
votes
1answer
67 views

HTTP Request & Response Parameters [closed]

How are request parameters stored and arranged for a post request if it's not json or xml? Is it possible to send response parameters back in the same way?
3
votes
2answers
123 views

Why HTTP Servers send information about themselves in HTTP Headers?

Most of the HTTP Servers I know send their application name and version in response http headers as default behaviour. (Nginx, IIS, Apache etc.) Of course we can change the default behaviour but I ...
3
votes
2answers
91 views

How should I specify locations where clients can resolve authorization problems in a REST API?

I'm working through an API design where a user's authentication will be verified by the presence of a valid forms authentication ticket in a session cookie. However, there are additional levels of ...
19
votes
2answers
2k views

Levels of user permissions in a RESTful API

Let's say I have a company that ranks the cutest cats on the internet. I offer a resource at /cats/ which provides users with the latest, cutest adorable cats. Users can either get just the top 3 ...
20
votes
8answers
5k views

When to use HTTP status code 404 in an API

I am working on a project and after arguing with people at work for about more than a hour. I decided to know what people on stack-exchange might say. We're writing an API for a system, there is a ...
4
votes
4answers
98 views

Should I write an integration test that verifies rate limits?

This test would call a web service over and over for about a minute to confirm that a particular response code is returned, notifying us of our rate limit being reached. Not only is it a very slow ...
3
votes
1answer
642 views

The Request/Response Cycle

When User A decides he want to pay a visit to http://example.com/ it all begins with a Request. A short moment later he is given a Response. In this cycle Request-Response a lot is going on, in ...
1
vote
3answers
1k views

Is path in Set-Cookie URL encoded?

I'm writing some code that sets cookies and I'm wondering about the exact semantics of the Set-Cookie header. Imagine the following HTTP header line: Set-Cookie: name=value; Path=/%20 For with path ...
1
vote
3answers
381 views

Which HTTP status codes are really OK?

I am writing an application to report to the user(devs) when their website fails. And what I mean by fails which is unfunctional or needs to report the problem to devs. I do understand that status ...
2
votes
1answer
487 views

Is Google's Page Speed not working fine?

I've been making small improvements to a public ASP.NET site that I have and have ran it through Google's online Page Speed several times. I have a specific problem, but something that really threw me ...
1
vote
1answer
3k views

REST and redirecting the response

I'm developing a RESTful service. Here is a map of the current feature set: POST /api/document/file.jpg (creates the resource) GET /api/document/file.jpg (retrieves the resource) DELETE ...
4
votes
1answer
3k views

RESTful HTTP OPTIONS request content

I'm having trouble determining what I might put in the body of a response to an OPTIONS request? are there conventions? standards? What do you put? do you just provide a list of other METHODS? should ...
5
votes
2answers
3k views

What are some best practices for cookie based web authentication?

I'm working on a small side project using CGI and Python (scalability is not an issue and it needs to be a VERY simple system.) I was thinking of implementing authentication using cookies, and was ...
1
vote
1answer
84 views

An application to get statistical data about HTTP Request/Response

I'm looking for an application which takes the address of a website, browses that website, and provides reports based on some user-defined criteria about the HTTP requests/responses. For example, this ...