1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-08 23:03:50 +00:00

Treat HTTP 201 response code as success

This commit is contained in:
Jermolene 2014-09-24 16:19:23 +02:00
parent c9f692d671
commit e2046ce4ff

View File

@ -39,7 +39,7 @@ exports.httpRequest = function(options) {
// Set up the state change handler // Set up the state change handler
request.onreadystatechange = function() { request.onreadystatechange = function() {
if(this.readyState === 4) { if(this.readyState === 4) {
if(this.status === 200 || this.status === 204) { if(this.status === 200 || this.status === 201 || this.status === 204) {
// Success! // Success!
options.callback(null,this.responseText,this); options.callback(null,this.responseText,this);
return; return;