- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 134 for mockwebserver3 (0.23 sec)
-
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
import okhttp3.DelegatingSocketFactory import okhttp3.OkHttpClient import okhttp3.OkHttpClientTestRule import okhttp3.Request import okhttp3.RequestBody import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import okhttp3.testing.PlatformRule import okio.Buffer import okio.BufferedSink import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
*/ package okhttp3.recipes; import java.net.InetAddress; import okhttp3.Call; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.tls.HandshakeCertificates; import okhttp3.tls.HeldCertificate; /** * Create an HTTPS server with a self-signed certificate that OkHttp trusts. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 02 14:04:37 UTC 2023 - 2.1K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java
import java.util.Collections; import okhttp3.OkHttpClient; import okhttp3.Protocol; import okhttp3.Request; import okhttp3.Response; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; /** * Create UNIX domain sockets for MockWebServer and OkHttp and connect 'em together. Note that we * cannot do TLS over domain sockets. */ public class ClientAndServer { public void run() throws Exception {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Dec 24 03:46:30 UTC 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt
} @Test @Disabled fun mockWebServer() { val mockWebServer = MockWebServer() var port: Int = mockWebServer.getPort() mockWebServer.setServerSocketFactory(ServerSocketFactory.getDefault()) mockWebServer.setBodyLimit(0L) mockWebServer.setProtocolNegotiationEnabled(false) mockWebServer.setProtocols(listOf(Protocol.HTTP_1_1))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.3K bytes - Viewed (0) -
mockwebserver/README.md
### Example Use MockWebServer the same way that you use mocking frameworks like [Mockito](https://github.com/mockito/mockito): 1. Script the mocks. 2. Run application code. 3. Verify that the expected requests were made. Here's a complete example: ```java public void test() throws Exception { // Create a MockWebServer. These are lean enough that you can create a new
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidLog.kt
this[OkHttpClient::class.java.name] = "okhttp.OkHttpClient" this[Http2::class.java.name] = "okhttp.Http2" this[TaskRunner::class.java.name] = "okhttp.TaskRunner" this["okhttp3.mockwebserver.MockWebServer"] = "okhttp.MockWebServer" }.toMap() internal fun androidLog( loggerName: String, logLevel: Int, message: String, t: Throwable? = null, ) { val tag = loggerTag(loggerName)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.9K bytes - Viewed (0) -
okhttp-tls/README.md
policy: ```java HandshakeCertificates serverCertificates = new HandshakeCertificates.Builder() .heldCertificate(localhostCertificate) .build(); MockWebServer server = new MockWebServer(); server.useHttps(serverCertificates.sslSocketFactory(), false); ``` `HandshakeCertificates` also works for clients where its job is to define which root certificates
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 9.1K bytes - Viewed (0) -
okhttp-hpacktests/build.gradle.kts
testImplementation(libs.squareup.moshi) testImplementation(libs.squareup.moshi.kotlin) testImplementation(projects.okhttp) testImplementation(projects.okhttpTestingSupport) testImplementation(projects.mockwebserver) testImplementation(libs.junit)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 04 05:32:07 UTC 2024 - 346 bytes - Viewed (0) -
samples/static-server/build.gradle.kts
} tasks.compileJava { options.isWarnings = false } tasks.jar { manifest { attributes("Main-Class" to "okhttp3.sample.SampleServer") } } dependencies { implementation(projects.mockwebserver) } tasks.shadowJar { mergeServiceFiles()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Feb 08 20:01:28 UTC 2022 - 316 bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/SocketPolicy.kt
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.mockwebserver enum class SocketPolicy { SHUTDOWN_SERVER_AFTER_RESPONSE, KEEP_OPEN, DISCONNECT_AT_END, UPGRADE_TO_SSL_AT_END, DISCONNECT_AT_START, DISCONNECT_AFTER_REQUEST, DISCONNECT_DURING_REQUEST_BODY,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1K bytes - Viewed (0)