- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for json (0.12 sec)
-
mockwebserver/README.md
You can set a custom body with a string, input stream or byte array. Also add headers with a fluent builder API. ```java MockResponse response = new MockResponse() .addHeader("Content-Type", "application/json; charset=utf-8") .addHeader("Cache-Control", "no-cache") .setBody("{}"); ``` MockResponse can be used to simulate a slow network. This is useful for testing timeouts and interactive testing. ```java
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 17 15:34:10 GMT 2023 - 5K bytes - Viewed (1) -
gradle/libs.versions.toml
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" } kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } mockserver = { module = "org.testcontainers:mockserver", version.ref = "testcontainers" }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 22 19:34:32 GMT 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WebPlatformToAsciiData.kt
package okhttp3 import kotlinx.serialization.Serializable import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json /** * A test from the [Web Platform To ASCII](https://github.com/web-platform-tests/wpt/blob/master/url/resources/toascii.json). * * Each test is a line of the file `toascii.json`. */ @Serializable class WebPlatformToAsciiData { var input: String? = null var output: String? = null
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 1.4K bytes - Viewed (0) -
okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt
@FromJson fun byteStringFromJson(json: String) = json.decodeHex() }, ) .add(KotlinJsonAdapterFactory()) .build() private val STORY_JSON_ADAPTER = MOSHI.adapter(Story::class.java) private val fileSystem = FileSystem.SYSTEM private fun readStory(source: BufferedSource): Story { return STORY_JSON_ADAPTER.fromJson(source)!! }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.3K bytes - Viewed (0) -
README.md
---------------- This program posts data to a service. [Full source][post_example]. ```java public static final MediaType JSON = MediaType.get("application/json"); OkHttpClient client = new OkHttpClient(); String post(String url, String json) throws IOException { RequestBody body = RequestBody.create(json, JSON); Request request = new Request.Builder() .url(url) .post(body) .build();
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 6.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt
private val client = OkHttpClient() private val fileSystem = FakeFileSystem() val path = "test.json".toPath() fun run() { fileSystem.write(path) { writeUtf8("{}") } val request = Request.Builder() .url("https://httpbin.org/anything") .put(path.asRequestBody(fileSystem, MEDIA_TYPE_JSON)) .build() client.newCall(request).execute().use { response ->
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WebPlatformUrlTestData.kt
import okhttp3.internal.format import okio.Buffer import okio.BufferedSource /** * A test from the [Web Platform URL test suite](https://github.com/web-platform-tests/wpt/blob/master/url/resources/urltestdata.json). * * Each test is a line of the file `urltestdata.txt`. The format is informally specified by its * JavaScript parser `urltestparser.js` with which this class attempts to be compatible. *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.7K bytes - Viewed (0) -
docs/works_with_okhttp.md
* [Hunter](https://github.com/Leaking/Hunter): Configure all OkHttpClients centrally. * ⬜️ [Moshi](https://github.com/square/moshi): A modern JSON library for Android and Java. * [Ok2Curl](https://github.com/mrmike/Ok2Curl): Convert OkHttp requests into curl logs. * [OkHttp AWS Signer](https://github.com/babbel/okhttp-aws-signer): AWS V4 signing algorithm for OkHttp requests
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Jun 08 18:15:23 GMT 2022 - 3.8K bytes - Viewed (0) -
okhttp/build.gradle.kts
testImplementation(libs.kotlin.test.annotations) testImplementation(libs.kotlin.test.common) testImplementation(libs.kotlinx.serialization.core) testImplementation(libs.kotlinx.serialization.json) testImplementation(projects.okhttpJavaNetCookiejar) testImplementation(projects.okhttpTls) testImplementation(projects.okhttpUrlconnection) testImplementation(projects.mockwebserver3)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Jan 04 05:32:07 GMT 2024 - 5.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/AccessHeaders.kt
Request.Builder() .url("https://api.github.com/repos/square/okhttp/issues") .header("User-Agent", "OkHttp Headers.java") .addHeader("Accept", "application/json; q=0.5") .addHeader("Accept", "application/vnd.github.v3+json") .build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.4K bytes - Viewed (0)