Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for HttpURLConnection (0.07 sec)

  1. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

     * limitations under the License.
     */
    package okhttp3.containers
    
    import assertk.assertThat
    import assertk.assertions.contains
    import assertk.assertions.isEqualTo
    import java.net.HttpURLConnection
    import java.net.Proxy
    import java.net.URI
    import javax.net.ssl.HttpsURLConnection
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.Request
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt

        server.enqueue(
          MockResponse
            .Builder()
            .code(HttpURLConnection.HTTP_MOVED_TEMP)
            .setHeader("Location", "/b")
            .headersDelay(100, TimeUnit.MILLISECONDS)
            .build(),
        )
        server.enqueue(
          MockResponse
            .Builder()
            .code(HttpURLConnection.HTTP_MOVED_TEMP)
            .setHeader("Location", "/c")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  3. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

      private fun buildRequestThread(
        path: String,
        responseCode: AtomicInteger,
      ): Thread =
        Thread {
          val url = mockWebServer.url(path).toUrl()
          val conn: HttpURLConnection
          try {
            conn = url.openConnection() as HttpURLConnection
            responseCode.set(conn.responseCode) // Force the connection to hit the "server".
          } catch (ignored: IOException) {
          }
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package mockwebserver3
    
    import java.net.HttpURLConnection
    import java.net.HttpURLConnection.HTTP_UNAVAILABLE
    import java.util.concurrent.BlockingQueue
    import java.util.concurrent.LinkedBlockingQueue
    import java.util.logging.Logger
    
    /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 14 16:09:26 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt

    package okhttp3
    
    import java.io.Closeable
    import java.io.IOException
    import java.net.HttpURLConnection.HTTP_MOVED_PERM
    import java.net.HttpURLConnection.HTTP_MOVED_TEMP
    import java.net.HttpURLConnection.HTTP_MULT_CHOICE
    import java.net.HttpURLConnection.HTTP_PROXY_AUTH
    import java.net.HttpURLConnection.HTTP_SEE_OTHER
    import java.net.HttpURLConnection.HTTP_UNAUTHORIZED
    import okhttp3.ResponseBody.Companion.asResponseBody
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 14:39:28 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheStrategy.kt

    package okhttp3.internal.cache
    
    import java.net.HttpURLConnection.HTTP_BAD_METHOD
    import java.net.HttpURLConnection.HTTP_GONE
    import java.net.HttpURLConnection.HTTP_MOVED_PERM
    import java.net.HttpURLConnection.HTTP_MOVED_TEMP
    import java.net.HttpURLConnection.HTTP_MULT_CHOICE
    import java.net.HttpURLConnection.HTTP_NOT_AUTHORITATIVE
    import java.net.HttpURLConnection.HTTP_NOT_FOUND
    import java.net.HttpURLConnection.HTTP_NOT_IMPLEMENTED
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 12K bytes
    - Viewed (0)
  7. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

    import android.net.http.UrlResponseInfo
    import androidx.test.ext.junit.runners.AndroidJUnit4
    import androidx.test.filters.SdkSuppress
    import androidx.test.platform.app.InstrumentationRegistry
    import java.net.HttpURLConnection
    import java.net.URL
    import java.nio.ByteBuffer
    import java.util.concurrent.CompletableFuture
    import java.util.concurrent.ExecutionException
    import java.util.concurrent.ExecutorService
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  8. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        val url = server.url("/").toUrl()
        val connection = url.openConnection() as HttpURLConnection
        assertThat(connection.getResponseCode()).isEqualTo(HttpURLConnection.HTTP_OK)
        val refusedConnection = url.openConnection() as HttpURLConnection
        assertFailsWith<ConnectException> {
          refusedConnection.getResponseCode()
        }.also { expected ->
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 13:16:34 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/curl/CurlRequest.java

        /**
         * Opens a connection to the specified URL.
         *
         * @param u the URL
         * @return the HttpURLConnection
         * @throws IOException if an I/O exception occurs
         */
        protected HttpURLConnection open(final URL u) throws IOException {
            final HttpURLConnection connection = (HttpURLConnection) (proxy != null ? u.openConnection(proxy) : u.openConnection());
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat Jul 05 01:38:18 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

            .shutdownServer(true)
            .build(),
        )
        val url = server.url("/").toUrl()
        val connection = url.openConnection() as HttpURLConnection
        assertThat(connection.responseCode).isEqualTo(HttpURLConnection.HTTP_OK)
        val refusedConnection = url.openConnection() as HttpURLConnection
        assertFailsWith<ConnectException> {
          refusedConnection.responseCode
        }.also { expected ->
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Aug 03 22:38:00 UTC 2025
    - 28K bytes
    - Viewed (0)
Back to top