- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for setBody (0.19 sec)
-
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
apply { headersBuilder.removeAll(name) } fun getBody(): Buffer? = body?.clone() fun setBody(body: Buffer) = apply { setHeader("Content-Length", body.size) this.body = body.clone() // Defensive copy. } fun setBody(body: String): MockResponse = setBody(Buffer().writeUtf8(body)) fun setChunkedBody( body: Buffer, maxChunkSize: Int,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/entity/TestEntity.java
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 1.2K bytes - Viewed (0) -
mockwebserver/README.md
// instance for every unit test. MockWebServer server = new MockWebServer(); // Schedule some responses. server.enqueue(new MockResponse().setBody("hello, world!")); server.enqueue(new MockResponse().setBody("sup, bra?")); server.enqueue(new MockResponse().setBody("yo dog")); // Start the server. server.start(); // Ask the server for its URL. You'll need this to make HTTP requests.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 5K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
server.enqueue( MockResponse() .setResponseCode(HttpURLConnection.HTTP_MOVED_TEMP) .addHeader("Location: " + server.url("/new-path")) .setBody("This page has moved!"), ) server.enqueue(MockResponse().setBody("This is the new location!")) val connection = server.url("/").toUrl().openConnection() val inputStream = connection.getInputStream()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
mockResponse.headers = headersOf() mockResponse.trailers = headersOf() mockResponse = mockResponse.removeHeader("") var body: Buffer? = mockResponse.getBody() mockResponse = mockResponse.setBody(Buffer()) mockResponse = mockResponse.setChunkedBody(Buffer(), 0) mockResponse = mockResponse.setChunkedBody("", 0) var socketPolicy: SocketPolicy = mockResponse.socketPolicy
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/CacheTest.kt
} internal enum class TransferKind { CHUNKED { override fun setBody( response: MockResponse.Builder, content: Buffer, chunkSize: Int, ) { response.chunkedBody(content, chunkSize) } }, FIXED_LENGTH { override fun setBody( response: MockResponse.Builder, content: Buffer, chunkSize: Int,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 108.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
call.execute() } } @Test fun interruptReadingResponseBody() { val responseBodySize = 8 * 1024 * 1024 // 8 MiB. server.enqueue( MockResponse() .setBody(Buffer().write(ByteArray(responseBodySize))) .throttleBody((64 * 1024).toLong(), 125, TimeUnit.MILLISECONDS), ) // 500 Kbps server.start() val call = client.newCall(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
} }, ; abstract fun setBody( response: MockResponse.Builder, content: Buffer?, chunkSize: Int, ) abstract fun newRequestBody(body: String): RequestBody fun setBody( response: MockResponse.Builder, content: String?, chunkSize: Int, ) { setBody(response, Buffer().writeUtf8(content!!), chunkSize) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 131.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
mockResponse.headers = headersOf() mockResponse.trailers = headersOf() mockResponse = mockResponse.removeHeader("") var body: Buffer? = mockResponse.getBody() mockResponse = mockResponse.setBody(Buffer()) mockResponse = mockResponse.setChunkedBody(Buffer(), 0) mockResponse = mockResponse.setChunkedBody("", 0) var socketPolicy: SocketPolicy = mockResponse.socketPolicy
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
internal/config/lambda/event/targetidset.go
func (set TargetIDSet) IsEmpty() bool { return len(set) != 0 } // Clone - returns copy of this set. func (set TargetIDSet) Clone() TargetIDSet { setCopy := NewTargetIDSet() for k, v := range set { setCopy[k] = v } return setCopy } // add - adds TargetID to the set. func (set TargetIDSet) add(targetID TargetID) { set[targetID] = struct{}{} }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 1.9K bytes - Viewed (0)