- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for Endpoint (0.2 sec)
-
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
.withNetworkAliases("mockserver") @Test fun testOkHttpDirect() { testRequest { val client = OkHttpClient() val response = client.newCall( Request((mockServer.endpoint + "/person?name=peter").toHttpUrl()), ).execute() assertThat(response.body.string()).contains("Peter the person") assertThat(response.protocol).isEqualTo(Protocol.HTTP_1_1) } } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 5.9K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt
request().withPath("/person") .withQueryStringParameter("name", "peter"), ) .respond(response().withBody("Peter the person!")) val response = client.newCall(Request((mockServer.endpoint + "/person?name=peter").toHttpUrl())).execute() assertThat(response.body.string()).contains("Peter the person") } } @Test fun testHttpsRequest() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 3.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 8.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 31 17:16:15 UTC 2024 - 35.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt
writer.flush() } /** * Degrades this connection such that new streams can neither be created locally, nor accepted * from the remote peer. Existing streams are not impacted. This is intended to permit an endpoint * to gracefully stop accepting new requests without harming previously established streams. */ @Throws(IOException::class) fun shutdown(statusCode: ErrorCode) { writer.withLock {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 32.6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/SpecificHostSocketFactory.kt
) { hostMapping[requested] = real } override fun createSocket(): Socket { return object : Socket() { override fun connect( endpoint: SocketAddress?, timeout: Int, ) { val requested = (endpoint as InetSocketAddress) val inetSocketAddress = hostMapping[requested.address] ?: defaultAddress ?: requested
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K 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(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 2.2K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt
private var keyAlgorithm: String? = null private var keySize: Int = 0 init { ecdsa256() } /** * Sets the certificate to be valid in ```[notBefore..notAfter]```. Both endpoints are specified * in the format of [System.currentTimeMillis]. Specify -1L for both values to use the default * interval, 24 hours starting when the certificate is created. */ fun validityInterval(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt
import okhttp3.RequestBody.Companion.asRequestBody class PostMultipart { private val client = OkHttpClient() fun run() { // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image val requestBody = MultipartBody.Builder() .setType(MultipartBody.FORM) .addFormDataPart("title", "Square Logo") .addFormDataPart( "image",
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.1K bytes - Viewed (0)