- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 205 for httpclient (0.16 sec)
-
samples/guide/src/main/java/okhttp3/recipes/Authenticate.java
*/ package okhttp3.recipes; import java.io.IOException; import okhttp3.Credentials; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class Authenticate { private final OkHttpClient client; public Authenticate() { client = new OkHttpClient.Builder() .authenticator((route, response) -> { if (response.request().header("Authorization") != null) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() .addTrustedCertificate(localhostCertificate.certificate()) .build(); OkHttpClient client = new OkHttpClient.Builder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) .build(); Call call = client.newCall(new Request.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 02 14:04:37 UTC 2023 - 2.1K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt
*/ package okhttp3.sse import okhttp3.Call import okhttp3.OkHttpClient import okhttp3.Response import okhttp3.sse.internal.RealEventSource object EventSources { @Deprecated( message = "required for binary-compatibility!", level = DeprecationLevel.HIDDEN, ) @JvmStatic fun createFactory(client: OkHttpClient) = createFactory(client as Call.Factory) @JvmStatic
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:18:15 UTC 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ExternalHttp2Example.kt
* limitations under the License. */ package okhttp3.internal.http import okhttp3.OkHttpClient import okhttp3.Protocol import okhttp3.Request object ExternalHttp2Example { @JvmStatic fun main(args: Array<String>) { val client = OkHttpClient.Builder() .protocols(listOf(Protocol.HTTP_2, Protocol.HTTP_1_1)) .build() val call = client.newCall(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/AsynchronousGet.kt
* limitations under the License. */ package okhttp3.recipes.kt import java.io.IOException import okhttp3.Call import okhttp3.Callback import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response class AsynchronousGet { private val client = OkHttpClient() fun run() { val request = Request.Builder() .url("http://publicobject.com/helloworld.txt") .build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostMultipart.java
*/ private static final String IMGUR_CLIENT_ID = "9199fdef135c122"; private static final MediaType MEDIA_TYPE_PNG = MediaType.get("image/png"); private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image RequestBody requestBody = new MultipartBody.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jun 24 12:59:42 UTC 2019 - 2.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidLog.kt
private val knownLoggers = LinkedHashMap<String, String>().apply { val packageName = OkHttpClient::class.java.`package`?.name if (packageName != null) { this[packageName] = "OkHttp" } this[OkHttpClient::class.java.name] = "okhttp.OkHttpClient" this[Http2::class.java.name] = "okhttp.Http2" this[TaskRunner::class.java.name] = "okhttp.TaskRunner"
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PreemptiveAuth.java
import java.io.IOException; import okhttp3.Credentials; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class PreemptiveAuth { private final OkHttpClient client; public PreemptiveAuth() { client = new OkHttpClient.Builder() .addInterceptor( new BasicAuthInterceptor("publicobject.com", "jesse", "password1"))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Nov 05 07:46:46 UTC 2018 - 2.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
* limitations under the License. */ package okhttp3.recipes.kt import java.io.IOException import java.net.HttpURLConnection.HTTP_MOVED_TEMP import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import okhttp3.tls.HandshakeCertificates import okhttp3.tls.internal.TlsUtil class DevServer {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/ParseResponseWithMoshi.kt
*/ package okhttp3.recipes.kt import com.squareup.moshi.JsonClass import com.squareup.moshi.Moshi import java.io.IOException import okhttp3.OkHttpClient import okhttp3.Request class ParseResponseWithMoshi { private val client = OkHttpClient() private val moshi = Moshi.Builder().build() private val gistJsonAdapter = moshi.adapter(Gist::class.java) fun run() { val request =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0)