Permalink
Browse files

Merge pull request #39 from frifri/master

Update couchClient to handle the 202 return code
  • Loading branch information...
2 parents 5042e76 + 872c1f6 commit d2f2e291988e2352895df06b2eeb565cde1c3440 @dready92 committed Mar 25, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/couchClient.php
View
@@ -484,7 +484,7 @@ public function storeDocs ( $docs, $all_or_nothing = false ) {
}
$url = '/'.urlencode($this->dbname).'/_bulk_docs';
- return $this->_queryAndTest ('POST', $url, array(200,201),array(),$request);
+ return $this->_queryAndTest ('POST', $url, array(200,201,202),array(),$request);
}
@@ -516,7 +516,7 @@ public function deleteDocs ( $docs, $all_or_nothing = false ) {
}
$url = '/'.urlencode($this->dbname).'/_bulk_docs';
- return $this->_queryAndTest ('POST', $url, array(200,201),array(),$request);
+ return $this->_queryAndTest ('POST', $url, array(200,201,202),array(),$request);
}
@@ -583,7 +583,7 @@ public function updateDocFullAPI ( $ddoc_id, $handler_name, $options = array() )
}
}
- return $this->_queryAndTest ($method, $url, array(200,201),$params,$data,$contentType);
+ return $this->_queryAndTest ($method, $url, array(200,201,202),$params,$data,$contentType);
}
/**
@@ -602,7 +602,7 @@ public function copyDoc($id,$new_id) {
$method = 'COPY';
$url = '/'.urlencode($this->dbname);
$url.='/'.urlencode($id);
- return $this->_queryAndTest ($method, $url, array(200,201),array(),$new_id);
+ return $this->_queryAndTest ($method, $url, array(200,201,202),array(),$new_id);
}
/**
@@ -664,7 +664,7 @@ public function deleteAttachment ($doc,$attachment_name ) {
$url = '/'.urlencode($this->dbname).
'/'.urlencode($doc->_id).
'/'.urlencode($attachment_name);
- return $this->_queryAndTest ('DELETE', $url, array(200),array('rev'=>$doc->_rev));
+ return $this->_queryAndTest ('DELETE', $url, array(200,202),array('rev'=>$doc->_rev));
}
/**
@@ -680,7 +680,7 @@ public function deleteDoc ( $doc ) {
return FALSE;
}
$url = '/'.urlencode($this->dbname).'/'.urlencode($doc->_id).'?rev='.urlencode($doc->_rev);
- return $this->_queryAndTest ('DELETE', $url, array(200));
+ return $this->_queryAndTest ('DELETE', $url, array(200,202));
}
/**

0 comments on commit d2f2e29

Please sign in to comment.