Skip to content

Commit

Permalink
For #236: Revision corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulodamaso committed Jan 2, 2019
1 parent 7671602 commit 1e2f684
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/com/amihaiemil/docker/RtNetwork.java
Expand Up @@ -27,6 +27,7 @@

import java.io.IOException;
import java.net.URI;
import javax.json.Json;
import javax.json.JsonObject;

import org.apache.http.HttpStatus;
Expand Down Expand Up @@ -112,7 +113,8 @@ public void connect(final String containerId)
);
post.setEntity(
new StringEntity(
String.format("{\"Container\" : \"%s\"}", containerId)
Json.createObjectBuilder().add("Container", containerId)
.build().toString()
)
);
try {
Expand All @@ -136,10 +138,10 @@ public void disconnect(final String containerId)
);
post.setEntity(
new StringEntity(
String.format(
"{\"Container\" : \"%s\", \"Force\": \"true\"}",
containerId
)
Json.createObjectBuilder()
.add("Container", containerId)
.add("Force", "true")
.build().toString()
)
);
try {
Expand Down

0 comments on commit 1e2f684

Please sign in to comment.