Treat HTTP 201 response code as success

print-window-tiddler
Jermolene 2014-09-24 16:19:23 +02:00
rodzic c9f692d671
commit e2046ce4ff
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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