mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 22:58:08 +01:00
Remove several unused classes
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.http;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
|
||||
public class FormDataBodyPublisher {
|
||||
|
||||
public static HttpRequest.BodyPublisher of(Map<String, String> data) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
for (Map.Entry<String, String> entry : data.entrySet()) {
|
||||
if (builder.length() > 0) {
|
||||
builder.append("&");
|
||||
}
|
||||
|
||||
builder.append(URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8));
|
||||
builder.append("=");
|
||||
builder.append(URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
return HttpRequest.BodyPublishers.ofString(builder.toString());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user