Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update Readme.md #79

Merged
merged 1 commit into from

2 participants

@esco

The request results in a resource being returned so 200 is more appropriate rather than 201 which is for when a resource is created.

@esco esco Update Readme.md
The request results in a resource being returned so 200 is more appropriate rather than 201 which is for when a resource is created.
bc749b9
@gjohnson gjohnson merged commit 7d5d348 into visionmedia:master

1 check failed

Details default The Travis CI build failed
@gjohnson
Owner

Fair enough. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 19, 2013
  1. @esco

    Update Readme.md

    esco authored
    The request results in a resource being returned so 200 is more appropriate rather than 201 which is for when a resource is created.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 Readme.md
View
4 Readme.md
@@ -23,14 +23,14 @@ var request = require('supertest')
var app = express();
app.get('/user', function(req, res){
- res.send(201, { name: 'tobi' });
+ res.send(200, { name: 'tobi' });
});
request(app)
.get('/user')
.expect('Content-Type', /json/)
.expect('Content-Length', '20')
- .expect(201)
+ .expect(200)
.end(function(err, res){
if (err) throw err;
});
Something went wrong with that request. Please try again.