- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for RecordedRequest (0.12 sec)
-
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/RecordedRequest.kt
import okhttp3.Handshake.Companion.handshake import okhttp3.Headers import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.TlsVersion import okio.Buffer class RecordedRequest { val requestLine: String val headers: Headers val chunkSizes: List<Int> val bodySize: Long val body: Buffer val sequenceNumber: Int val failure: IOException? val method: String?
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.1K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/RecordedRequest.kt
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.internal.platform.Platform import okio.Buffer /** An HTTP request that came into the mock web server. */ @ExperimentalOkHttpApi class RecordedRequest( val requestLine: String, /** All headers. */ val headers: Headers, /** * The sizes of the chunks of this request's body, or an empty list if the request's body * was empty or unchunked. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 3.8K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
var headers: Headers = recordedRequest.headers val header: String? = recordedRequest.getHeader("") var chunkSizes: List<Int> = recordedRequest.chunkSizes var bodySize: Long = recordedRequest.bodySize var body: Buffer = recordedRequest.body var utf8Body: String = recordedRequest.body.readUtf8() var sequenceNumber: Int = recordedRequest.sequenceNumber var tlsVersion: TlsVersion? = recordedRequest.tlsVersion
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
.assertReceivedResponseAtMillis(sentAt, receivedAt) val recordedRequest = server.takeRequest() assertThat(recordedRequest.method).isEqualTo("GET") assertThat(recordedRequest.headers["User-Agent"]).isEqualTo("SyncApiTest") assertThat(recordedRequest.body.size).isEqualTo(0) assertThat(recordedRequest.headers["Content-Length"]).isNull() } @Test fun buildRequestUsingHttpUrl() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt
this.mockWebServer = mockWebServer } @Test fun simpleDispatch() { val requestsMade = mutableListOf<RecordedRequest>() val dispatcher: Dispatcher = object : Dispatcher() { override fun dispatch(request: RecordedRequest): MockResponse { requestsMade.add(request) return MockResponse() } } assertThat(requestsMade.size).isEqualTo(0)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.3K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
TaskRunner.RealBackend( threadFactory("MockWebServer TaskRunner", daemon = false), ) private val taskRunner = TaskRunner(taskRunnerBackend) private val requestQueue = LinkedBlockingQueue<RecordedRequest>() private val openClientSockets = Collections.newSetFromMap(ConcurrentHashMap<Socket, Boolean>()) private val openConnections = Collections.newSetFromMap(ConcurrentHashMap<Http2Connection, Boolean>())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 31 17:16:15 UTC 2024 - 37.4K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt
"0003b00049df00112", ), ) val result = dns.lookup("google.com") assertThat(result).isEqualTo(listOf(address("157.240.1.18"))) val recordedRequest = server.takeRequest() assertThat(recordedRequest.method).isEqualTo("GET") assertThat(recordedRequest.path) .isEqualTo("/lookup?ct&dns=AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ") } @Test fun getIpv6() { server.enqueue( dnsResponse(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 11K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt
assertThat(response.isSuccessful).isTrue() val recordedRequest = server.takeRequest() assertThat(recordedRequest.requestUrl!!.host).isEqualTo("header-host") assertThat(recordedRequest.handshakeServerNames).containsExactly("url-host.com") } /** No SNI for literal IPv6 addresses. */ @Test fun ipv6() { val recordedRequest = requestToHostnameViaProxy("2607:f8b0:400b:804::200e")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.9K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/RecordedRequestTest.kt
@Test fun testIPv4() { val socket = FakeSocket( localAddress = InetAddress.getByAddress("127.0.0.1", byteArrayOf(127, 0, 0, 1)), localPort = 80, ) val request = RecordedRequest("GET / HTTP/1.1", headers, emptyList(), 0, Buffer(), 0, socket) assertThat(request.requestUrl.toString()).isEqualTo("http://127.0.0.1/") } @Test fun testIpv6() { val socket = FakeSocket(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
var headers: Headers = recordedRequest.headers val header: String? = recordedRequest.getHeader("") var chunkSizes: List<Int> = recordedRequest.chunkSizes var bodySize: Long = recordedRequest.bodySize var body: Buffer = recordedRequest.body var utf8Body: String = recordedRequest.body.readUtf8() var sequenceNumber: Int = recordedRequest.sequenceNumber
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0)