From 6b26672ed5064b496772bc2808ecb8f85c699475 Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Fri, 12 Jul 2024 01:56:46 +0300 Subject: [PATCH] Fix OkHttp deprecations --- .../redreader/http/okhttp/OKHTTPBackend.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/quantumbadger/redreader/http/okhttp/OKHTTPBackend.java b/src/main/java/org/quantumbadger/redreader/http/okhttp/OKHTTPBackend.java index 2115e077b..6820679eb 100644 --- a/src/main/java/org/quantumbadger/redreader/http/okhttp/OKHTTPBackend.java +++ b/src/main/java/org/quantumbadger/redreader/http/okhttp/OKHTTPBackend.java @@ -213,8 +213,8 @@ public RequestBody visitRequestBody( @NonNull final HTTPRequestBodyPostFields body) { return RequestBody.create( - MediaType.parse("application/x-www-form-urlencoded"), - PostField.encodeList(body.getPostFields())); + PostField.encodeList(body.getPostFields()), + MediaType.parse("application/x-www-form-urlencoded")); } @Override @@ -240,8 +240,8 @@ public Void visitPart(@NonNull final PartFormDataBinary part) { part.name, null, RequestBody.create( - MediaType.parse("application/octet-stream"), - part.value)); + part.value, + MediaType.parse("application/octet-stream"))); return Void.INSTANCE; }