Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding response code 201, 202 to put/post

  • Loading branch information...
commit e5dd90e717b8adb1dcf34880a3b1ecb7a8c534e7 1 parent 3cdbb6b
@Kagetsuki Kagetsuki authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/org/genshin/spree/RESTConnector.java
View
4 src/org/genshin/spree/RESTConnector.java
@@ -248,7 +248,7 @@ public int putWithArgs(String targetURL, ArrayList<NameValuePair> pairs) {
HttpResponse response = client.execute(put);
StatusLine statusLine = response.getStatusLine();
statusCode = statusLine.getStatusCode();
- if (statusCode == 200) {
+ if (statusCode == 200 || statusCode == 201 || statusCode == 202) {
HttpEntity entity = response.getEntity();
String content = EntityUtils.toString(entity);
} else {
@@ -281,7 +281,7 @@ public int postWithArgs(String targetURL, ArrayList<NameValuePair> pairs) {
HttpResponse response = client.execute(post);
StatusLine statusLine = response.getStatusLine();
statusCode = statusLine.getStatusCode();
- if (statusCode == 200) {
+ if (statusCode == 200 || statusCode == 201 || statusCode == 202) {
HttpEntity entity = response.getEntity();
String content = EntityUtils.toString(entity);
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.