New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Routes that redirect result in 'Moved Temporarily.' response body #21
Comments
because you're redirecting :p redirects have been set to |
I understand the concept of that issue, but I don't want magic test results. ;) My problem on api testing: My test spec should:
with Your suggestion to test what a route does is not the api and http-spec way: " The response SHOULD include an entity containing a list of resource characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content-Type header field." |
@jensklose, what @visionmedia suggested is actually asserting that the response was a redirect (status code 302) and also the Location header contents, which is the If you want a status code 201 to be sent, since a resource was created, just don't redirect! |
Sorry, but you should visit some RESTful APIs and not the quick and dirty CRUD earlies. ;) see this discus to review your 302 decision You could implement a "raw" mode |
What would you rather do in this case? Include 301 and 303? I think I misunderstood the point of your first comment here. Oh and, please, don't go telling people what they don't know unless you want to turn a constructive discussion into a destructive argument. By doing that you're just being a dick. If you really know that much about REST and the interwebs, why is it that you didn't send a pull request to fix this yet? |
I must apologize to you on two counts. After investing some deeper look in my test case, your great library and the express api, I've found the fault on my site. Express makes the response statusCode switch to 302 if I try a One way to test API calls with response code and redirect location:
Thx for your work. |
First of all, excellent library. Thanks for your work.
Even the simplest route that redirects results in a
Moved Temporarily.
response body. For example,One thing that looks odd is the different ports in the output
Express server listening on port 3000
, and the testRedirecting to //127.0.0.1:3456/login
.The text was updated successfully, but these errors were encountered: