/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
D | MultipartBuilderTest.java | 41 RequestBody requestBody = new MultipartBuilder("123") in singlePart() 42 .addPart(RequestBody.create(null, "Hello, World!")) in singlePart() 70 RequestBody requestBody = new MultipartBuilder("123") in threeParts() 71 .addPart(RequestBody.create(null, "Quick")) in threeParts() 72 .addPart(RequestBody.create(null, "Brown")) in threeParts() 73 .addPart(RequestBody.create(null, "Fox")) in threeParts() 114 RequestBody requestBody = new MultipartBuilder("AaB03x") in fieldAndTwoFiles() 121 RequestBody.create( in fieldAndTwoFiles() 127 RequestBody.create( in fieldAndTwoFiles() 167 RequestBody requestBody = new MultipartBuilder("AaB03x") in stringEscapingIsWeird() [all …]
|
D | RequestTest.java | 36 RequestBody body = RequestBody.create(contentType, "abc".getBytes(Util.UTF_8)); in string() 45 RequestBody body = RequestBody.create(contentType, "\u0800"); in stringWithDefaultCharsetAdded() 53 RequestBody body = RequestBody.create(contentType, "\u0800"); in stringWithNonDefaultCharsetSpecified() 61 RequestBody body = RequestBody.create(contentType, "abc".getBytes(Util.UTF_8)); in byteArray() 70 RequestBody body = RequestBody.create(contentType, ".abcd".getBytes(Util.UTF_8), 1, 3); in byteArrayRange() 84 RequestBody body = RequestBody.create(contentType, file); in file() 94 RequestBody body = RequestBody.create(contentType, "{}"); in crudVerbs() 231 private String bodyToHex(RequestBody body) throws IOException { in bodyToHex()
|
D | FormEncodingBuilderTest.java | 26 RequestBody formEncoding = new FormEncodingBuilder() in urlEncoding() 43 RequestBody formEncoding = new FormEncodingBuilder() in addEncoded() 56 RequestBody formEncoding = new FormEncodingBuilder() in encodedPair() 69 RequestBody formEncoding = new FormEncodingBuilder() in encodeMultiplePairs() 84 RequestBody formEncoding = new FormEncodingBuilder().build(); in buildEmptyForm() 173 RequestBody body = new FormEncodingBuilder() in formEncode()
|
D | CallTest.java | 223 new Request.Builder().method("GET", RequestBody.create(MediaType.parse("text/plain"), "abc")); in getWithRequestBody() 269 .post(RequestBody.create(MediaType.parse("text/plain"), "def")) in post() 303 .method("POST", RequestBody.create(null, new byte[0])) in postZeroLength() 377 .method("POST", RequestBody.create(null, body)) in postBodyRetransmittedAfterAuthorizationFail() 467 .method("DELETE", RequestBody.create(MediaType.parse("text/plain"), "def")) in deleteWithRequestBody() 484 .put(RequestBody.create(MediaType.parse("text/plain"), "def")) in put() 518 .patch(RequestBody.create(MediaType.parse("text/plain"), "def")) in patch() 552 .method("POST", RequestBody.create(null, "abc")) in unspecifiedRequestBodyContentTypeDoesNotGetDefault() 796 RequestBody requestBody1 = new RequestBody() { in reusedSinksGetIndependentTimeoutInstances() 813 RequestBody requestBody2 = new RequestBody() { in reusedSinksGetIndependentTimeoutInstances() [all …]
|
D | InterceptorTest.java | 221 RequestBody body = RequestBody.create(mediaType, "abc"); in networkInterceptorsCanChangeRequestMethodFromGetToPost() 266 .method("PUT", RequestBody.create(MediaType.parse("text/plain"), "abc")) in rewriteRequestToServer() 609 private RequestBody uppercase(final RequestBody original) { in uppercase() 610 return new RequestBody() { in uppercase()
|
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/ |
D | RequestBody.java | 27 public abstract class RequestBody { class 46 public static RequestBody create(MediaType contentType, String content) { in create() 60 public static RequestBody create(final MediaType contentType, final ByteString content) { in create() 61 return new RequestBody() { in create() 77 public static RequestBody create(final MediaType contentType, final byte[] content) { 82 public static RequestBody create(final MediaType contentType, final byte[] content, 86 return new RequestBody() { 102 public static RequestBody create(final MediaType contentType, final File file) { 105 return new RequestBody() {
|
D | MultipartBuilder.java | 79 private final List<RequestBody> partBodies = new ArrayList<>(); 112 public MultipartBuilder addPart(RequestBody body) { in addPart() 117 public MultipartBuilder addPart(Headers headers, RequestBody body) { in addPart() 169 return addFormDataPart(name, null, RequestBody.create(null, value)); in addFormDataPart() 173 public MultipartBuilder addFormDataPart(String name, String filename, RequestBody value) { in addFormDataPart() 189 public RequestBody build() { in build() 196 private static final class MultipartRequestBody extends RequestBody { 200 private final List<RequestBody> partBodies; 204 List<RequestBody> partBodies) { in MultipartRequestBody() 239 RequestBody body = partBodies.get(p); in writeOrCountBytes()
|
D | Request.java | 32 private final RequestBody body; 85 public RequestBody body() { in body() 124 private RequestBody body; 231 public Builder post(RequestBody body) { in post() 235 public Builder delete(RequestBody body) { in delete() 240 return delete(RequestBody.create(null, new byte[0])); in delete() 243 public Builder put(RequestBody body) { in put() 247 public Builder patch(RequestBody body) { in patch() 251 public Builder method(String method, RequestBody body) { in method()
|
D | FormEncodingBuilder.java | 56 public RequestBody build() { in build() 57 return RequestBody.create(CONTENT_TYPE, content.snapshot()); in build()
|
/external/okhttp/okhttp-ws-tests/src/test/java/com/squareup/okhttp/internal/ws/ |
D | RealWebSocketTest.java | 19 import com.squareup.okhttp.RequestBody; 106 client.sendMessage(RequestBody.create(TEXT, "Hello!")); in textMessage() 112 client.sendMessage(RequestBody.create(BINARY, "Hello!")); in binaryMessage() 119 client.sendMessage(RequestBody.create(null, "Hey!")); in missingContentTypeThrows() 129 client.sendMessage(RequestBody.create(MediaType.parse("text/plain"), "Hey!")); in unknownContentTypeThrows() 139 RequestBody message = new RequestBody() { in streamingMessage() 156 RequestBody message = new RequestBody() { in streamingMessageCanInterleavePing() 213 client.sendMessage(RequestBody.create(TEXT, "Hello!")); in clientCloseThenMethodsThrow() 231 client.sendMessage(RequestBody.create(TEXT, "Hello!")); in socketClosedDuringPingKillsWebSocket() 248 client.sendMessage(RequestBody.create(TEXT, "Hello!")); in socketClosedDuringMessageKillsWebSocket() [all …]
|
/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/ |
D | RequestBodyCompression.java | 23 import com.squareup.okhttp.RequestBody; 50 RequestBody jsonRequestBody = RequestBody.create( in run() 82 private RequestBody gzip(final RequestBody body) { in gzip() 83 return new RequestBody() { in gzip()
|
D | WebSocketEcho.java | 5 import com.squareup.okhttp.RequestBody; 39 webSocket.sendMessage(RequestBody.create(TEXT, "Hello...")); in onOpen() 40 webSocket.sendMessage(RequestBody.create(TEXT, "...World!")); in onOpen() 41 webSocket.sendMessage(RequestBody.create(BINARY, ByteString.decodeHex("deadbeef"))); in onOpen()
|
D | PostMultipart.java | 22 import com.squareup.okhttp.RequestBody; 40 RequestBody requestBody = new MultipartBuilder() in run() 44 RequestBody.create(MEDIA_TYPE_PNG, new File("website/static/logo-square.png"))) in run()
|
D | PostStreaming.java | 21 import com.squareup.okhttp.RequestBody; 33 RequestBody requestBody = new RequestBody() { in run()
|
D | PostForm.java | 21 import com.squareup.okhttp.RequestBody; 29 RequestBody formBody = new FormEncodingBuilder() in run()
|
D | PostString.java | 21 import com.squareup.okhttp.RequestBody; 42 .post(RequestBody.create(MEDIA_TYPE_MARKDOWN, postBody)) in run()
|
D | PostFile.java | 21 import com.squareup.okhttp.RequestBody; 37 .post(RequestBody.create(MEDIA_TYPE_MARKDOWN, file)) in run()
|
/external/okhttp/okcurl/src/test/java/com/squareup/okhttp/curl/ |
D | MainTest.java | 19 import com.squareup.okhttp.RequestBody; 45 RequestBody body = request.body(); in dataPost() 54 RequestBody body = request.body(); in dataPut() 64 RequestBody body = request.body(); in contentTypeHeader() 93 private static String bodyAsString(RequestBody body) { in bodyAsString()
|
/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/guide/ |
D | PostExample.java | 6 import com.squareup.okhttp.RequestBody; 17 RequestBody body = RequestBody.create(JSON, json); in post()
|
/external/okhttp/okhttp-ws/src/main/java/com/squareup/okhttp/ws/ |
D | WebSocket.java | 19 import com.squareup.okhttp.RequestBody; 40 void sendMessage(RequestBody message) throws IOException; in sendMessage()
|
/external/okhttp/okhttp-ws-tests/src/main/java/com/squareup/okhttp/ws/ |
D | AutobahnTester.java | 20 import com.squareup.okhttp.RequestBody; 86 final RequestBody response; in runTest() 88 response = RequestBody.create(TEXT, message.string()); in runTest() 91 response = RequestBody.create(BINARY, source.readByteString()); in runTest()
|
/external/okhttp/okhttp-apache/src/main/java/com/squareup/okhttp/apache/ |
D | HttpEntityBody.java | 4 import com.squareup.okhttp.RequestBody; 10 final class HttpEntityBody extends RequestBody {
|
D | OkApacheClient.java | 7 import com.squareup.okhttp.RequestBody; 59 RequestBody body = null; in transformRequest() 71 body = RequestBody.create(null, new byte[0]); in transformRequest()
|
/external/okhttp/okhttp-logging-interceptor/src/test/java/com/squareup/okhttp/logging/ |
D | HttpLoggingInterceptorTest.java | 22 import com.squareup.okhttp.RequestBody; 128 client.newCall(request().post(RequestBody.create(PLAIN, "Hi?")).build()).execute(); in basicPost() 197 Request request = request().post(RequestBody.create(PLAIN, "Hi?")).build(); in headersPost() 234 Request request = request().post(RequestBody.create(null, "Hi?")).build(); in headersPostNoContentType() 269 RequestBody body = new RequestBody() { in headersPostNoLength() 422 Request request = request().post(RequestBody.create(PLAIN, "Hi?")).build(); in bodyPost()
|
/external/okhttp/okhttp-ws-tests/src/test/java/com/squareup/okhttp/ws/ |
D | WebSocketCallTest.java | 20 import com.squareup.okhttp.RequestBody; 67 webSocket.sendMessage(RequestBody.create(TEXT, "Hello, WebSockets!")); in clientMessage() 77 webSocket.sendMessage(RequestBody.create(TEXT, "Hello, WebSockets!")); in serverMessage() 200 webSocket.sendMessage(RequestBody.create(TEXT, "abc")); in websocketScheme()
|