- Sort Score
- Result 10 results
- Languages All
Results 471 - 480 of 657 for fun (0.07 sec)
-
mockwebserver-junit4/src/main/kotlin/mockwebserver3/junit4/MockWebServerRule.kt
* ``` */ @ExperimentalOkHttpApi class MockWebServerRule : ExternalResource() { val server: MockWebServer = MockWebServer() override fun before() { try { server.start() } catch (e: IOException) { throw RuntimeException(e) } } override fun after() { try { server.shutdown() } catch (e: IOException) { logger.log(Level.WARNING, "MockWebServer shutdown failed", e)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 1.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt
OkHttpClient.Builder() .sslSocketFactory(certificates.sslSocketFactory(), certificates.trustManager) .build() } fun run() { showUrl("https://squareup.com/robots.txt") showUrl("https://publicobject.com/helloworld.txt") } private fun showUrl(url: String) { val request = Builder().url(url).build() client.newCall(request) .execute() .use { response ->
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/FormBodyTest.kt
} @Test fun encodedPair() { val body = FormBody.Builder() .add("sim", "ple") .build() val expected = "sim=ple" assertThat(body.contentLength()).isEqualTo(expected.length.toLong()) val buffer = Buffer() body.writeTo(buffer) assertThat(buffer.readUtf8()).isEqualTo(expected) } @Test fun encodeMultiplePairs() { val body =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.8K bytes - Viewed (0) -
.teamcity/src/test/kotlin/PerformanceTestBuildTypeTest.kt
branch = VersionedSettingsBranch("master"), buildScanTags = listOf("Check"), subprojects = JsonBasedGradleSubprojectProvider(File("../.teamcity/subprojects.json")) ) @Test fun `create correct PerformanceTest build type for Linux`() { val performanceTest = PerformanceTest( buildModel, Stage( StageName.PULL_REQUEST_FEEDBACK,
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Mon Sep 30 07:24:00 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/DateFormatting.kt
/** * Most websites serve cookies in the blessed format. Eagerly create the parser to ensure such * cookies are on the fast path. */ private val STANDARD_DATE_FORMAT = object : ThreadLocal<DateFormat>() { override fun initialValue(): DateFormat { // Date format specified by RFC 7231 section 7.1.1.1. return SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US).apply { isLenient = false timeZone = UTC
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.1K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt
private val listener = EventSourceRecorder() private val client = clientTestRule.newClient() @BeforeEach fun before(server: MockWebServer) { this.server = server } @AfterEach fun after() { listener.assertExhausted() } @Test fun processResponse() { server.enqueue( MockResponse.Builder() .body( """ |data: hey |
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 2.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CancelCall.kt
import java.util.concurrent.TimeUnit import okhttp3.OkHttpClient import okhttp3.Request class CancelCall { private val executor = Executors.newScheduledThreadPool(1) private val client = OkHttpClient() fun run() { val request = Request.Builder() .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay. .build() val startNanos = System.nanoTime()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ConnectionEvent.kt
val exception: IOException, ) : ConnectionEvent() { override fun closes(event: ConnectionEvent): Boolean = event is ConnectStart && call == event.call && route == event.route } data class ConnectEnd( override val timestampNs: Long, override val connection: Connection, val route: Route, val call: Call, ) : ConnectionEvent() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt
/** Returns true if this string is not a host name and might be an IP address. */ fun String.canParseAsIpAddress(): Boolean = VERIFY_AS_IP_ADDRESS.matches(this) /** * Returns true if the length is not valid for DNS (empty or greater than 253 characters), or if any * label is longer than 63 characters. Trailing dots are okay. */ internal fun String.containsInvalidLabelLengths(): Boolean { if (length !in 1..253) return true
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.2K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt
} } return@let null } ?: "application/x-www-form-urlencoded" return mimeType.toMediaTypeOrNull() } private fun isSpecialHeader(s: String): Boolean { return s.equals("Content-Type", ignoreCase = true) } fun Main.commonRun() { client = createClient() val request = createRequest() try { val response = client!!.newCall(request).execute() if (showHeaders) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.7K bytes - Viewed (0)