- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 122 for contexts (0.23 sec)
-
okhttp/src/test/java/okhttp3/RequestBodyTest.kt
FileInputStream(filePath.toFile()).use { fis -> fn(fis.fd) } } } private inline fun <T> assertOnPath( content: String? = null, fn: (okio.Path) -> T, ): T { FileSystem.SYSTEM.write(filePath) { if (content != null) { writeUtf8(content) } } return fn(filePath) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.6K bytes - Viewed (1) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
* * Example: * ``` * --> POST /greeting http/1.1 * Host: example.com * Content-Type: plain/text * Content-Length: 3 * --> END POST * * <-- 200 OK (22ms) * Content-Type: plain/text * Content-Length: 6 * <-- END HTTP * ``` */ HEADERS, /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 09:14:38 GMT 2024 - 11.2K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt
// Oracle JDK. Note that we don't support HTTP/2 or other nice features on Robolectric. val sslContextClass = Class.forName("sun.security.ssl.SSLContextImpl") val context = readFieldOrNull(sslSocketFactory, sslContextClass, "context") ?: return null readFieldOrNull(context, X509TrustManager::class.java, "trustManager") } catch (e: ClassNotFoundException) { null } catch (e: RuntimeException) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.8K bytes - Viewed (1) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt
toDer(writer, value) return buffer.readByteString() } /** * Returns an adapter that expects this value wrapped by another value. Typically this occurs * when a value has both a context or application tag and a universal tag. * * Use this for EXPLICIT tag types: * * ``` * [5] EXPLICIT UTF8String * ``` *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.2K bytes - Viewed (0) -
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
return new MockResponse() .setStatus("HTTP/1.1 404") .addHeader("content-type: text/plain; charset=utf-8") .setBody("NOT FOUND: " + path); } catch (IOException e) { return new MockResponse() .setStatus("HTTP/1.1 500") .addHeader("content-type: text/plain; charset=utf-8") .setBody("SERVER ERROR: " + e); } }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Jan 02 02:50:44 GMT 2019 - 4.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt
* exceptions thrown from the test do not cause this check to fail. */ @RegisterExtension val noDataLeftBehind = AfterEachCallback { context: ExtensionContext -> if (context.executionException.isPresent) return@AfterEachCallback assertThat(data.readByteString().hex(), "Data not empty") .isEqualTo("") }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/RealResponseBody.kt
import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.ResponseBody import okio.BufferedSource class RealResponseBody( /** * Use a string to avoid parsing the content type until needed. This also defers problems caused * by malformed content types. */ private val contentTypeString: String?, private val contentLength: Long, private val source: BufferedSource, ) : ResponseBody() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
* content to go along with it. https://github.com/square/okhttp/issues/358 */ @Test fun noTransparentGzipFor304NotModified() { server.enqueue( MockResponse.Builder() .clearHeaders() .code(HttpURLConnection.HTTP_NOT_MODIFIED) .addHeader("Content-Encoding: gzip") .build(), )
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 131.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
return Buffer().writeUtf8("hello") } } assertFailsWith<IOException> { body.bytes() }.also { expected -> assertThat(expected.message).isEqualTo( "Content-Length (10) and stream length (5) disagree", ) } } @Test fun bytesThrowsMoreThanIntMaxValue() { val body: ResponseBody = object : ResponseBody() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt
val derReader = DerReader(buffer) derReader.read("test") { header -> assertThat(header.tag).isEqualTo(2L) assertThat(header.tagClass).isEqualTo(DerHeader.TAG_CLASS_CONTEXT_SPECIFIC) assertThat(header.length).isEqualTo(7L) derReader.read("test") { header -> assertThat(header.tag).isEqualTo(3L)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 31.7K bytes - Viewed (0)