- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 86 for github (0.17 sec)
-
okhttp/src/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt
assertThat(verifier.verify("foo.com", session)).isTrue() assertThat(verifier.verify("bar.com", session)).isFalse() } @Test fun specialKInHostname() { // https://github.com/apache/httpcomponents-client/commit/303e435d7949652ea77a6c50df1c548682476b6e // https://www.gosecure.net/blog/2020/10/27/weakness-in-java-tls-host-verification/ val heldCertificate = HeldCertificate.Builder()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 40.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WebPlatformUrlTestData.kt
* limitations under the License. */ package okhttp3 import okhttp3.internal.format import okio.Buffer import okio.BufferedSource /** * A test from the [Web Platform URL test suite](https://github.com/web-platform-tests/wpt/blob/master/url/resources/urltestdata.json). * * Each test is a line of the file `urltestdata.txt`. The format is informally specified by its
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestTest.kt
assertThat(body.contentLength()).isEqualTo(3) assertThat(bodyToHex(body)).isEqualTo("616263") assertThat(bodyToHex(body), "Retransmit body").isEqualTo("616263") } /** Common verbs used for apis such as GitHub, AWS, and Google Cloud. */ @Test fun crudVerbs() { val contentType = "application/json".toMediaType() val body = "{}".toRequestBody(contentType)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 16.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/guide/GetExample.java
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/ParseResponseWithMoshi.kt
private val moshi = Moshi.Builder().build() private val gistJsonAdapter = moshi.adapter(Gist::class.java) fun run() { val request = Request.Builder() .url("https://api.github.com/gists/c2a7c39532239ff261be") .build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.6K bytes - Viewed (1) -
samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt
import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.testing.PlatformRule import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.RegisterExtension /** * OkHttp. * * https://square.github.io/okhttp/ */ class OkHttpClientTest { @JvmField @RegisterExtension val platform = PlatformRule() @Test fun get(server: MockWebServer) { server.enqueue(MockResponse(body = "hello, OkHttp"))
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.8K bytes - Viewed (0) -
samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java
import java.util.List; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; public class OkHttpContributors { private static final String ENDPOINT = "https://api.github.com/repos/square/okhttp/contributors"; private static final Moshi MOSHI = new Moshi.Builder().build(); private static final JsonAdapter<List<Contributor>> CONTRIBUTORS_JSON_ADAPTER = MOSHI.adapter(
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2.2K bytes - Viewed (0) -
okhttp-brotli/src/test/java/okhttp3/brotli/BrotliBombTest.kt
import okio.ByteString import okio.ByteString.Companion.decodeHex import okio.IOException import okio.buffer import okio.gzip import org.junit.jupiter.api.Test class BrotliBombTest { /** https://github.com/square/okhttp/issues/7738 */ @Test fun testDecompressBomb() { val response = Response.Builder() .code(200) .message("OK") .header("Content-Encoding", "br")
Plain Text - Registered: Fri Mar 29 11:42:11 GMT 2024 - Last Modified: Mon Jan 29 22:50:20 GMT 2024 - 2.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt
} taskFaker.runNextTask() // Check that a rebuilt journal behaves normally. assertValue("a", "a", "a") assertValue("b", "b", "b") } /** @see [Issue 28](https://github.com/JakeWharton/DiskLruCache/issues/28) */ @ParameterizedTest @ArgumentsSource(FileSystemParamProvider::class) fun rebuildJournalOnRepeatedReadsWithOpenAndClose(parameters: Pair<FileSystem, Boolean>) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 14:55:09 GMT 2024 - 75.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/RequestBody.kt
* reads of the [ResponseBody]. For duplex request bodies, [writeTo] should return * quickly, possibly by handing off the provided request body to another thread to perform * writing. * * [grpc]: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md */ open fun isDuplex(): Boolean = commonIsDuplex() /** * Returns true if this body expects at most one call to [writeTo] and can be transmitted
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Jan 25 14:41:37 GMT 2024 - 9.6K bytes - Viewed (0)