- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for createRequest (0.28 sec)
-
okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt
fun simple() { val request = fromArgs("http://example.com").createRequest() assertThat(request.method).isEqualTo("GET") assertThat(request.url.toString()).isEqualTo("http://example.com/") assertThat(request.body).isNull() } @Test @Throws(IOException::class) fun put() { val request = fromArgs("-X", "PUT", "-d", "foo", "http://example.com").createRequest() assertThat(request.method).isEqualTo("PUT")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.3K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt
} 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) { println(StatusLine.get(response)) val headers = response.headers for ((name, value) in headers) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.7K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/Main.kt
var client: Call.Factory? = null override fun run() { LoggingUtil.configureLogging(debug = verbose, showHttp2Frames = showHttp2Frames, sslDebug = sslDebug) commonRun() } fun createRequest(): Request = commonCreateRequest() fun createClient(): Call.Factory { val builder = OkHttpClient.Builder() builder.followSslRedirects(followRedirects) if (connectTimeout != DEFAULT_TIMEOUT) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0)