diff --git a/pom.xml b/pom.xml
index 8d67f6189..30d44892c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,7 +94,7 @@
org.whispersystems
websocket-resources
- 0.3.3
+ 0.4.0
org.whispersystems
diff --git a/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java b/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java
index b24ab0ddc..15614ce7a 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java
@@ -228,6 +228,7 @@ public class WhisperServerService extends Application body = Optional.of(outgoingMessage.getContent().toByteArray());
- ListenableFuture response = client.sendRequest("PUT", "/v1/message", body);
+ ListenableFuture response = client.sendRequest("PUT", "/v1/message", null, body);
Futures.addCallback(response, new FutureCallback() {
@Override
@@ -54,10 +54,10 @@ public class ProvisioningConnection implements DispatchChannel {
public void onDispatchSubscribed(String channel) {
try {
ProvisioningAddress address = new ProvisioningAddress(channel);
- this.client.sendRequest("PUT", "/v1/address", Optional.of(ProvisioningUuid.newBuilder()
- .setUuid(address.getAddress())
- .build()
- .toByteArray()));
+ this.client.sendRequest("PUT", "/v1/address", null, Optional.of(ProvisioningUuid.newBuilder()
+ .setUuid(address.getAddress())
+ .build()
+ .toByteArray()));
} catch (InvalidWebsocketAddressException e) {
logger.warn("Badly formatted address", e);
this.client.close(1001, "Server Error");
diff --git a/src/main/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnection.java b/src/main/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnection.java
index 5b6ec41cb..58d534315 100644
--- a/src/main/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnection.java
+++ b/src/main/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnection.java
@@ -105,7 +105,7 @@ public class WebSocketConnection implements DispatchChannel {
try {
EncryptedOutgoingMessage encryptedMessage = new EncryptedOutgoingMessage(message, device.getSignalingKey());
Optional body = Optional.fromNullable(encryptedMessage.toByteArray());
- ListenableFuture response = client.sendRequest("PUT", "/api/v1/message", body);
+ ListenableFuture response = client.sendRequest("PUT", "/api/v1/message", null, body);
Futures.addCallback(response, new FutureCallback() {
@Override
diff --git a/src/test/java/org/whispersystems/textsecuregcm/tests/websocket/WebSocketConnectionTest.java b/src/test/java/org/whispersystems/textsecuregcm/tests/websocket/WebSocketConnectionTest.java
index 4d83b0e56..bdb231839 100644
--- a/src/test/java/org/whispersystems/textsecuregcm/tests/websocket/WebSocketConnectionTest.java
+++ b/src/test/java/org/whispersystems/textsecuregcm/tests/websocket/WebSocketConnectionTest.java
@@ -130,7 +130,7 @@ public class WebSocketConnectionTest {
final List> futures = new LinkedList<>();
final WebSocketClient client = mock(WebSocketClient.class);
- when(client.sendRequest(eq("PUT"), eq("/api/v1/message"), any(Optional.class)))
+ when(client.sendRequest(eq("PUT"), eq("/api/v1/message"), any(List.class), any(Optional.class)))
.thenAnswer(new Answer>() {
@Override
public SettableFuture answer(InvocationOnMock invocationOnMock) throws Throwable {
@@ -145,7 +145,7 @@ public class WebSocketConnectionTest {
account, device, client);
connection.onDispatchSubscribed(websocketAddress.serialize());
- verify(client, times(3)).sendRequest(eq("PUT"), eq("/api/v1/message"), any(Optional.class));
+ verify(client, times(3)).sendRequest(eq("PUT"), eq("/api/v1/message"), anyList(), any(Optional.class));
assertTrue(futures.size() == 3);
@@ -214,7 +214,7 @@ public class WebSocketConnectionTest {
final List> futures = new LinkedList<>();
final WebSocketClient client = mock(WebSocketClient.class);
- when(client.sendRequest(eq("PUT"), eq("/api/v1/message"), any(Optional.class)))
+ when(client.sendRequest(eq("PUT"), eq("/api/v1/message"), anyList(), any(Optional.class)))
.thenAnswer(new Answer>() {
@Override
public SettableFuture answer(InvocationOnMock invocationOnMock) throws Throwable {
@@ -239,7 +239,7 @@ public class WebSocketConnectionTest {
.setContent(ByteString.copyFrom(secondMessage.toByteArray()))
.build().toByteArray());
- verify(client, times(2)).sendRequest(eq("PUT"), eq("/api/v1/message"), any(Optional.class));
+ verify(client, times(2)).sendRequest(eq("PUT"), eq("/api/v1/message"), anyList(), any(Optional.class));
assertEquals(futures.size(), 2);
@@ -320,7 +320,7 @@ public class WebSocketConnectionTest {
final List> futures = new LinkedList<>();
final WebSocketClient client = mock(WebSocketClient.class);
- when(client.sendRequest(eq("PUT"), eq("/api/v1/message"), any(Optional.class)))
+ when(client.sendRequest(eq("PUT"), eq("/api/v1/message"), anyList(), any(Optional.class)))
.thenAnswer(new Answer>() {
@Override
public SettableFuture answer(InvocationOnMock invocationOnMock) throws Throwable {
@@ -336,7 +336,7 @@ public class WebSocketConnectionTest {
connection.onDispatchSubscribed(websocketAddress.serialize());
- verify(client, times(2)).sendRequest(eq("PUT"), eq("/api/v1/message"), any(Optional.class));
+ verify(client, times(2)).sendRequest(eq("PUT"), eq("/api/v1/message"), anyList(), any(Optional.class));
assertEquals(futures.size(), 2);