-
Notifications
You must be signed in to change notification settings - Fork 0
/
http code.txt
57 lines (41 loc) · 1.57 KB
/
http code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
201 in a messaging pub\sub system where the messages can be requeued and order isn't guaranteed and messages may be processed more than once and the message hub is our client.
For a PUT request: HTTP 200 or HTTP 204 should imply "resource updated successfully".
For a DELETE request: HTTP 200 or HTTP 204 should imply "resource deleted successfully".
CREATED 201
Accepted 202 queue http://www.adayinthelifeof.nl/2011/06/02/asynchronous-operations-in-rest/
400 bad request
401 (Unauthorized) user login failed
403 (Forbidden) user don't have access to the resources
404 (Not Found) resource not found
409 409 Conflict user name existed
408 (Request Timeout)
500 (Internal Server Error)
502 (Bad Gateway) Service temporarily overloaded 502
503 (Service Unavailable) Gateway timeout
504 (Gateway Timeout)
what is the http code for update successsful? 201 or
if(err) {
if(req.xhr) return res.send({'meta':204,'data':null,'error':err.err},204);
next(err);
}
else{
console.log('update success'.green, data,req.url);
if(req.xhr) return res.send({'meta':200,'data':null},200);
res.redirect(req.url);
}
http://msdn.microsoft.com/en-us/library/windowsazure/dd179357.aspx
UnsupportedHeader 400
MissingRequiredHeader 400
InvalidHeaderValue 400
MissingRequiredQueryParameter 400
UnsupportedQueryParameter 400
InvalidQueryParameterValue 400
OutOfRangeQueryParameterValue 400
RequestUrlFailedToParse 400
InvalidUri 400
Md5Mismatch 400
InvalidAuthenticationInfo 400
AccountAlreadyExists
AccountBeingCreated
RequestBodyTooLarge 413
InvalidRange 416