Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for json (0.18 sec)

  1. okhttp/src/test/java/okhttp3/RequestTest.kt

        assertThat(bodyToHex(body), "Retransmit body").isEqualTo("616263")
      }
    
      /** Common verbs used for apis such as GitHub, AWS, and Google Cloud.  */
      @Test
      fun crudVerbs() {
        val contentType = "application/json".toMediaType()
        val body = "{}".toRequestBody(contentType)
    
        val get = Request.Builder().url("http://localhost/api").get().build()
        assertThat(get.method).isEqualTo("GET")
        assertThat(get.body).isNull()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  2. docs/recipes.md

              System.out.println(response.body().string());
            }
          }
        ```
    
    ### Parse a JSON Response With Moshi ([.kt][ParseResponseWithMoshiKotlin], [.java][ParseResponseWithMoshiJava])
    
    [Moshi](https://github.com/square/moshi) is a handy API for converting between JSON and Java objects. Here we're using it to decode a JSON response from a GitHub API.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
Back to top