Downgrade okhttp & okio

This commit is contained in:
Luck 2019-11-19 18:09:14 +00:00
parent c4bd657826
commit 213b2fcb44
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
3 changed files with 8 additions and 8 deletions

View File

@ -19,8 +19,8 @@ dependencies {
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.guava:guava:19.0'
compile 'com.github.ben-manes.caffeine:caffeine:2.8.0'
compile 'com.squareup.okhttp3:okhttp:4.2.2'
compile 'com.squareup.okio:okio:2.2.2'
compile 'com.squareup.okhttp3:okhttp:3.14.4'
compile 'com.squareup.okio:okio:1.17.4'
compile('me.lucko.configurate:configurate-core:3.5') {
exclude(module: 'guava')
}

View File

@ -121,15 +121,15 @@ public enum Dependency {
OKIO(
"com{}squareup{}" + RelocationHelper.OKIO_STRING,
RelocationHelper.OKIO_STRING,
"2.2.2",
"5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs=",
"1.17.4",
"14+sWIRY/AmebILpH+XwN1xnQ0YmRRo6d3csZdnu6Fs=",
Relocation.of(RelocationHelper.OKIO_STRING, RelocationHelper.OKIO_STRING)
),
OKHTTP(
"com{}squareup{}" + RelocationHelper.OKHTTP3_STRING,
"okhttp",
"4.2.2",
"UGQYLP9AsQDOV/vzzpheEuOM9EM3JOgbF1wYQ+rsu3U=",
"3.14.4",
"WMyzdU8VzELfjxaHs7qGMw7ZfH5S5cPoP+ETG4DOPg8=",
Relocation.of(RelocationHelper.OKHTTP3_STRING, RelocationHelper.OKHTTP3_STRING),
Relocation.of(RelocationHelper.OKIO_STRING, RelocationHelper.OKIO_STRING)
),

View File

@ -79,7 +79,7 @@ public class BytebinClient extends AbstractHttpClient {
* @throws IOException if an error occurs
*/
public Content postContent(byte[] buf, MediaType contentType, boolean allowModification) throws IOException {
RequestBody body = RequestBody.create(buf, contentType);
RequestBody body = RequestBody.create(contentType, buf);
Request.Builder requestBuilder = new Request.Builder()
.url(this.url + "post")
@ -122,7 +122,7 @@ public class BytebinClient extends AbstractHttpClient {
throw new IllegalArgumentException("Existing content is not modifiable");
}
RequestBody body = RequestBody.create(buf, contentType);
RequestBody body = RequestBody.create(contentType, buf);
Request.Builder requestBuilder = new Request.Builder()
.url(this.url + existingContent.key())