- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 92 for access (0.14 sec)
-
samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt
HttpRequest.newBuilder(server.url("/").toUri()) .header("Accept", "text/plain") .build() val response = httpClient.send(request, BodyHandlers.ofString()) assertThat(response.statusCode()).isEqualTo(200) assertThat(response.body()).isEqualTo("hello, Java HTTP Client") val recorded = server.takeRequest() assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.7K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt
@JvmStatic fun createFactory(callFactory: Call.Factory): EventSource.Factory { return EventSource.Factory { request, listener -> val actualRequest = if (request.header("Accept") == null) { request.newBuilder().addHeader("Accept", "text/event-stream").build() } else { request } RealEventSource(actualRequest, listener).apply { connect(callFactory) } }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 04:18:15 GMT 2024 - 1.6K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt
fun executeOn(executorService: ExecutorService) { client.dispatcher.assertThreadDoesntHoldLock() var success = false try { executorService.execute(this) success = true } catch (e: RejectedExecutionException) { failRejected(e) } finally { if (!success) { client.dispatcher.finished(this) // This call is no longer running! } } }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 17.9K bytes - Viewed (2) -
okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt
} } } private fun readAndWriteFrames() { check(socket == null) val socket = serverSocket!!.accept()!! this.socket = socket // Bail out now if this instance was closed while waiting for the socket to accept. synchronized(this) { if (executor.isShutdown) { socket.close() return } }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.7K bytes - Viewed (0) -
okhttp-android/src/androidTest/AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="okhttp.android.test"> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
XML - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 20 06:48:45 GMT 2022 - 195 bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
getResponse( Request.Builder() .url(server.url("/")) .header("Accept-Encoding", "custom") .build(), ) assertThat(readAscii(response.body.byteStream(), Int.MAX_VALUE)).isEqualTo("ABCDE") val request = server.takeRequest() assertThat(request.headers["Accept-Encoding"]).isEqualTo("custom") } /**
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) -
samples/slack/src/main/java/okhttp3/slack/SlackClient.java
} } /** Starts a real time messaging session. */ public void startRtm() throws IOException { String accessToken; synchronized (this) { accessToken = session.access_token; } RtmSession rtmSession = new RtmSession(slackApi); rtmSession.open(accessToken); } public static void main(String... args) throws Exception {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 12 03:31:36 GMT 2019 - 3.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt
labelStart = dot + 1 } return false } internal fun String.containsInvalidHostnameAsciiCodes(): Boolean { for (i in 0 until length) { val c = this[i] // The WHATWG Host parsing rules accepts some character codes which are invalid by // definition for OkHttp's host header checks (and the WHATWG Host syntax definition). Here // we rule out characters that would cause problems in host headers.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt
import okio.BufferedSink import okio.BufferedSource /** * A connection to a remote web server capable of carrying 1 or more concurrent streams. * * Connections are shared in a connection pool. Accesses to the connection's state must be guarded * by holding a lock on the connection. */ class RealConnection( val taskRunner: TaskRunner, val connectionPool: RealConnectionPool, override val route: Route,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 15.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HttpUrlTest.kt
// * They use punycode for internationalization. // * URI is much more strict than HttpUrl or URL on what's accepted. // // HttpUrl is quite lenient with what characters it accepts. In particular, characters like '{' // and '"' are permitted but unlikely to occur in real-world URLs. Unfortunately we can't just // lock it down due to URL templating: "http://{env}.{dc}.example.com".
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 67.9K bytes - Viewed (0)