Skip to content

Commit

Permalink
#876 Updated pom.xml, refactored CarefulWire and RtSearchPagination
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmiranda committed Jul 18, 2014
1 parent 1f8a431 commit 366f046
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,17 @@
<groupId>com.jcabi</groupId>
<artifactId>jcabi-xml</artifactId>
</dependency>
<!--
@todo #876 The version of this jcabi-http dependency should be
managed by the parent pom, however, com.jcabi:jcabi is currently
referencing an older version. When the parent references version
1.8 or newer, let's remove the version element here and revert
back to being managed by the parent.
-->
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-http</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>com.jcabi.incubator</groupId>
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/jcabi/github/RtSearchPagination.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import com.jcabi.http.Response;
import com.jcabi.http.Wire;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.lang.reflect.InvocationTargetException;
import java.net.URI;
Expand Down Expand Up @@ -155,6 +156,10 @@ public Response fetch() throws IOException {
return new RtSearchPagination.Hidden(this.request.fetch());
}
@Override
public Response fetch(final InputStream stream) throws IOException {
return new RtSearchPagination.Hidden(this.request.fetch(stream));
}
@Override
@NotNull(message = "Request should never be NULL")
public <T extends Wire> Request through(final Class<T> type,
final Object... args) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/jcabi/github/wire/CarefulWire.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.jcabi.http.Wire;
import com.jcabi.log.Logger;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -105,7 +106,7 @@ public CarefulWire(@NotNull(message = "wire can't be NULL")
public Response send(final Request req, final String home,
final String method,
final Collection<Map.Entry<String, String>> headers,
final byte[] content) throws IOException {
final InputStream content) throws IOException {
final Response resp = this.origin
.send(req, home, method, headers, content);
final int remaining = Integer.parseInt(
Expand Down

0 comments on commit 366f046

Please sign in to comment.