File tree 2 files changed +7
-3
lines changed
pandora-core/src/main/java/tech/linjiang/pandora/network/okhttp3/internal/huc
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ buildscript {
6
6
' MIN_SDK' : 14 ,
7
7
' TARGET_SDK' : 28 ,
8
8
' SUPPORT_LIB' : ' 2.0.0-rc01' ,
9
- ' OKHTTP' : ' 3.9 .0'
9
+ ' OKHTTP' : ' 3.14 .0'
10
10
]
11
11
12
12
repositories {
Original file line number Diff line number Diff line change 16
16
package tech .linjiang .pandora .network .okhttp3 .internal .huc ;
17
17
18
18
import java .io .IOException ;
19
- import okhttp3 .internal .http .UnrepeatableRequestBody ;
20
19
import okio .Buffer ;
21
20
import okio .BufferedSink ;
22
21
import okio .Okio ;
26
25
* This request body streams bytes from an application thread to an OkHttp dispatcher thread via a
27
26
* pipe. Because the data is not buffered it can only be transmitted once.
28
27
*/
29
- final class StreamedRequestBody extends OutputStreamRequestBody implements UnrepeatableRequestBody {
28
+ final class StreamedRequestBody extends OutputStreamRequestBody {
30
29
private final Pipe pipe = new Pipe (8192 );
31
30
32
31
StreamedRequestBody (long expectedContentLength ) {
@@ -39,4 +38,9 @@ final class StreamedRequestBody extends OutputStreamRequestBody implements Unrep
39
38
sink .write (buffer , buffer .size ());
40
39
}
41
40
}
41
+
42
+ @ Override
43
+ public boolean isOneShot () {
44
+ return true ;
45
+ }
42
46
}
You can’t perform that action at this time.
0 commit comments