- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for toMediaType (0.08 sec)
-
okhttp/src/main/kotlin/okhttp3/MediaType.kt
message = "moved to extension function", replaceWith = ReplaceWith( expression = "mediaType.toMediaType()", imports = ["okhttp3.MediaType.Companion.toMediaType"], ), level = DeprecationLevel.ERROR, ) fun get(mediaType: String): MediaType = mediaType.toMediaType() @JvmName("-deprecated_parse") @Deprecated( message = "moved to extension function",
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyTest.kt
* limitations under the License. */ package okhttp3 import assertk.assertThat import assertk.assertions.isEqualTo import assertk.assertions.isTrue import kotlin.test.Test import okhttp3.MediaType.Companion.toMediaType import okhttp3.ResponseBody.Companion.toResponseBody import okio.Buffer import okio.BufferedSource import okio.ByteString.Companion.decodeHex import okio.ByteString.Companion.encodeUtf8 import okio.IOException
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MediaTypeGetTest.kt
*/ package okhttp3 import kotlin.test.assertEquals import kotlin.test.assertFailsWith import okhttp3.MediaType.Companion.toMediaType open class MediaTypeGetTest : MediaTypeTest() { override fun parse(string: String): MediaType = string.toMediaType() override fun assertInvalid( string: String, exceptionMessage: String?, ) { val e =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostFile.kt
* limitations under the License. */ package okhttp3.recipes.kt import java.io.File import java.io.IOException import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.asRequestBody class PostFile { private val client = OkHttpClient() fun run() { val file = File("README.md")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
return "application/xml".toMediaType() } override fun writeTo(sink: BufferedSink) { sink.writeUtf8("<el") sink.flush() throw IOException("failed to stream the XML") } } class ValidRequestBody : RequestBody() { override fun contentType(): MediaType { return "application/xml".toMediaType() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 8.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostStreaming.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 import okio.BufferedSink class PostStreaming { private val client = OkHttpClient() fun run() { val requestBody =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt
* 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() fun run() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.1K bytes - Viewed (0) -
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() { val postBody = """
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
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
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestBodyTest.kt
import assertk.assertions.isEqualTo import assertk.assertions.isNull import java.io.FileDescriptor import java.io.FileInputStream import java.io.IOException import java.nio.file.Path import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody.Companion.asRequestBody import okhttp3.RequestBody.Companion.toRequestBody import okio.Buffer import okio.FileSystem import okio.Path.Companion.toOkioPath
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.6K bytes - Viewed (0)