diff --git a/changelog.txt b/changelog.txt index bca2181..6c0bf3e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -69,3 +69,4 @@ * FEATURE: Added default Content-Type header * FEATURE: SoundCloud Api * FEATURE: Sapo Api + * FEATURE: Plurk Mobile Api diff --git a/src/main/java/org/scribe/model/Response.java b/src/main/java/org/scribe/model/Response.java index 1ac91d4..f8aa83a 100644 --- a/src/main/java/org/scribe/model/Response.java +++ b/src/main/java/org/scribe/model/Response.java @@ -27,7 +27,7 @@ public class Response connection.connect(); code = connection.getResponseCode(); headers = parseHeaders(connection); - stream = wasSuccessful() ? connection.getInputStream() : connection.getErrorStream(); + stream = isSuccessful() ? connection.getInputStream() : connection.getErrorStream(); } catch (UnknownHostException e) { @@ -52,7 +52,7 @@ public class Response return headers; } - private boolean wasSuccessful() + public boolean isSuccessful() { return getCode() >= 200 && getCode() < 400; } @@ -101,10 +101,9 @@ public class Response /** * Obtains a single HTTP Header value, or null if undefined * - * @param header - * name + * @param name the header name. * - * @return header value or null + * @return header value or null. */ public String getHeader(String name) {