mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 14:56:47 +00:00
minor cleanup, docs, and integration tests for username API
This commit is contained in:
1 parent
47cc7fd615
commit
e6917d8427
7 files changed
+306
-183
No files matched your search
@@ -269,6 +269,15 @@ public final class Operations {
|
||||
return requireNonNull(execute.getRight());
|
||||
}
|
||||
|
||||
public void executeExpectStatusCode(final int expectedStatusCode) {
|
||||
final Pair<Integer, Void> execute = execute(Void.class);
|
||||
Validate.isTrue(
|
||||
execute.getLeft() == expectedStatusCode,
|
||||
"Unexpected response code: %d",
|
||||
execute.getLeft()
|
||||
);
|
||||
}
|
||||
|
||||
public <T> Pair<Integer, T> execute(final Class<T> expectedType) {
|
||||
builder.uri(serverUri(endpoint, queryParams))
|
||||
.header(HttpHeaders.USER_AGENT, USER_AGENT);
|
||||
|
||||
Reference in new issue
Block a user