Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 41 - 50 of 77 for MediaType (0.04 seconds)

  1. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

    import java.net.InetAddress
    import java.net.UnknownHostException
    import java.util.concurrent.CountDownLatch
    import okhttp3.Call
    import okhttp3.Callback
    import okhttp3.Dns
    import okhttp3.HttpUrl
    import okhttp3.MediaType
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.Response
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat May 10 11:15:14 GMT 2025
    - 8.6K bytes
    - Click Count (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/MultipartBodyTest.kt

    import assertk.assertions.isEqualTo
    import java.io.IOException
    import java.nio.charset.StandardCharsets
    import kotlin.test.assertFailsWith
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.MediaType.Companion.toMediaTypeOrNull
    import okhttp3.RequestBody.Companion.toRequestBody
    import okio.Buffer
    import okio.BufferedSink
    import okio.utf8Size
    import org.junit.jupiter.api.Test
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 10.5K bytes
    - Click Count (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt

            val originalRequest = chain.request()
            val mediaType = "text/plain".toMediaType()
            val body = "abc".toRequestBody(mediaType)
            chain.proceed(
              originalRequest
                .newBuilder()
                .method("POST", body)
                .header("Content-Type", mediaType.toString())
                .header("Content-Length", body.contentLength().toString())
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue Nov 04 16:11:23 GMT 2025
    - 28.2K bytes
    - Click Count (0)
  4. fastapi/openapi/models.py

        content: Optional[dict[str, MediaType]] = None
    
    
    class Parameter(ParameterBase):
        name: str
        in_: ParameterInType = Field(alias="in")
    
    
    class Header(ParameterBase):
        pass
    
    
    class RequestBody(BaseModelWithConfig):
        description: Optional[str] = None
        content: dict[str, MediaType]
        required: Optional[bool] = None
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 15.1K bytes
    - Click Count (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingResponseBody.kt

    open class ForwardingResponseBody(
      delegate: ResponseBody?,
    ) : ResponseBody() {
      private val delegate: ResponseBody
    
      fun delegate(): ResponseBody = delegate
    
      override fun contentType(): MediaType? = delegate.contentType()
    
      override fun contentLength(): Long = delegate.contentLength()
    
      override fun source(): BufferedSource = delegate.source()
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  6. samples/guide/src/main/java/okhttp3/recipes/kt/PostString.kt

     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.IOException
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.toRequestBody
    
    class PostString {
      private val client = OkHttpClient()
    
      fun run() {
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Click Count (0)
  7. samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.File
    import java.io.IOException
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.MultipartBody
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.asRequestBody
    
    class PostMultipart {
      private val client = OkHttpClient()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.IOException
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.asRequestBody
    import okio.Path.Companion.toPath
    import okio.buffer
    import okio.fakefilesystem.FakeFileSystem
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 1.7K bytes
    - Click Count (0)
  9. docs/changelogs/upgrading_to_okhttp_4.md

    | HttpUrl.uri()                       | HttpUrl.toUri()                 |
    | HttpUrl.url()                       | HttpUrl.toUrl()                 |
    | MediaType.get(String)               | String.toMediaType()            |
    | MediaType.parse(String)             | String.toMediaTypeOrNull()      |
    | RequestBody.create(ByteArray)       | ByteArray.toRequestBody()       |
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sun Feb 06 16:58:16 GMT 2022
    - 10.9K bytes
    - Click Count (0)
  10. samples/guide/src/main/java/okhttp3/recipes/kt/UploadProgress.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.File
    import java.io.IOException
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.RequestBody
    import okhttp3.RequestBody.Companion.asRequestBody
    import okio.Buffer
    import okio.BufferedSink
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat Aug 30 17:01:12 GMT 2025
    - 3.8K bytes
    - Click Count (0)
Back to Top