Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for subtypeOf (0.17 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

        }
    
        private fun bodyIsStreaming(response: Response): Boolean {
          val contentType = response.body.contentType()
          return contentType != null && contentType.type == "text" && contentType.subtype == "event-stream"
        }
    
        companion object
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  2. okhttp/src/test/java/okhttp3/MediaTypeJvmTest.kt

          assertEquals("image", mediaType.type)
          assertEquals("jpeg", mediaType.subtype)
        }
      }
    
      @Test fun testTurkishDotlessIWithTrTr() {
        withLocale(Locale("tr", "TR")) {
          val mediaType = parse("IMAGE/JPEG")
          assertEquals("image", mediaType.type)
          assertEquals("jpeg", mediaType.subtype)
        }
      }
    
      private fun <T> withLocale(
        locale: Locale,
        block: () -> T,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        val keyPair: KeyPair = heldCertificate.keyPair()
      }
    
      @Test @Disabled
      fun mediaType() {
        val mediaType: MediaType = MediaType.get("")
        val type: String = mediaType.type()
        val subtype: String = mediaType.subtype()
        val parse: MediaType? = MediaType.parse("")
      }
    
      @Test @Disabled
      fun mockResponse() {
        val mockResponse = MockResponse()
        var status: String = mockResponse.getStatus()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

          }
        }
    
      companion object {
        /**
         * The "mixed" subtype of "multipart" is intended for use when the body parts are independent
         * and need to be bundled in a particular order. Any "multipart" subtypes that an implementation
         * does not recognize must be treated as being of subtype "mixed".
         */
        @JvmField
        val MIXED = "multipart/mixed".toMediaType()
    
        /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  5. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/TunnelingUnixSocket.java

    import java.net.InetAddress;
    import java.net.InetSocketAddress;
    import java.net.SocketAddress;
    import jnr.unixsocket.UnixSocket;
    import jnr.unixsocket.UnixSocketAddress;
    import jnr.unixsocket.UnixSocketChannel;
    
    /**
     * Subtype UNIX socket for a higher-fidelity impersonation of TCP sockets. This is named "tunneling"
     * because it assumes the ultimate destination has a hostname and port.
     */
    final class TunnelingUnixSocket extends UnixSocket {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Feb 12 16:33:52 GMT 2019
    - 1.9K bytes
    - Viewed (1)
  6. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

          if (responseCode != 200 || contentType == null) {
            return;
          }
    
          MediaType mediaType = MediaType.parse(contentType);
          if (mediaType == null || !mediaType.subtype().equalsIgnoreCase("html")) {
            return;
          }
    
          Document document = Jsoup.parse(response.body().string(), url.toString());
          for (Element element : document.select("a[href]")) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val mediaType: MediaType = "".toMediaType()
        val defaultCharset: Charset? = mediaType.charset()
        val charset: Charset? = mediaType.charset(Charsets.UTF_8)
        val type: String = mediaType.type
        val subtype: String = mediaType.subtype
        val parse: MediaType? = "".toMediaTypeOrNull()
      }
    
      @Test
      fun mockResponse() {
        var mockResponse: MockResponse = MockResponse()
        var status: String = mockResponse.status
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  8. okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt

    private const val QUOTED = "\"([^\"]*)\""
    private val TYPE_SUBTYPE = Regex("$TOKEN/$TOKEN")
    private val PARAMETER = Regex(";\\s*(?:$TOKEN=(?:$TOKEN|$QUOTED))?")
    
    /**
     * Returns a media type for this string.
     *
     * @throws IllegalArgumentException if this is not a well-formed media type.
     */
    internal fun String.commonToMediaType(): MediaType {
      val typeSubtype: MatchResult =
        TYPE_SUBTYPE.matchAtPolyfill(this, 0)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  9. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

            listener.onClosed(this)
          }
        }
      }
    
      private fun ResponseBody.isEventStream(): Boolean {
        val contentType = contentType() ?: return false
        return contentType.type == "text" && contentType.subtype == "event-stream"
      }
    
      override fun onFailure(
        call: Call,
        e: IOException,
      ) {
        listener.onFailure(this, e, null)
      }
    
      override fun request(): Request = request
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  10. okhttp/api/okhttp.api

    	public final fun invoke (Lkotlin/jvm/functions/Function1;)Lokhttp3/Interceptor;
    }
    
    public final class okhttp3/MediaType {
    	public static final field Companion Lokhttp3/MediaType$Companion;
    	public final fun -deprecated_subtype ()Ljava/lang/String;
    	public final fun -deprecated_type ()Ljava/lang/String;
    	public final fun charset ()Ljava/nio/charset/Charset;
    	public final fun charset (Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
Back to top