Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for body (0.18 sec)

  1. README.md

        return response.body().string();
      }
    }
    ```
    
    
    Post to a Server
    ----------------
    
    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);
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  2. okhttp-coroutines/README.md

    OkHttp Coroutines
    =================
    
    Support for Kotlin clients using coroutines.
    
    ```kotlin
    val call = client.newCall(request)
    
    call.executeAsync().use { response ->
      withContext(Dispatchers.IO) {
        println(response.body?.string())
      }
    }
    ```
    
    This is implemented using `suspendCancellableCoroutine`
    but uses the standard Dispatcher in OkHttp. This means
    that by default Kotlin's Dispatchers are not used.
    
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Thu Nov 09 15:47:27 GMT 2023
    - 609 bytes
    - Viewed (0)
  3. okhttp-logging-interceptor/README.md

      @Override public void log(String message) {
        Timber.tag("OkHttp").d(message);
      }
    });
    ```
    
    **Warning**: The logs generated by this interceptor when using the `HEADERS` or `BODY` levels have
    the potential to leak sensitive information such as "Authorization" or "Cookie" headers and the
    contents of request and response bodies. This data should only be logged in a controlled way or in
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  4. docs/bucket/notifications/README.md

    channel.queue_bind(exchange='bucketevents',
                       queue=queue_name)
    
    print(' [*] Waiting for logs. To exit press CTRL+C')
    
    def callback(ch, method, properties, body):
        print(" [x] %r" % body)
    
    channel.basic_consume(callback,
                          queue=queue_name,
                          no_ack=False)
    
    channel.start_consuming()
    ```
    
    Plain Text
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 84K bytes
    - Viewed (2)
  5. docs/bucket/retention/README.md

    ```sh
    aws s3api put-object --bucket testbucket --key lockme --object-lock-mode GOVERNANCE --object-lock-retain-until-date "2019-11-20"  --body /etc/issue
    ```
    
    See <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html> for AWS S3 spec on object locking and permissions required for object retention and governance bypass overrides.
    
    Plain Text
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Sep 29 04:28:45 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  6. README.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
    
    ## Example upgrade
    
    Now modify the file `main.py` to receive a body from a `PUT` request.
    
    Declare the body using standard Python types, thanks to Pydantic.
    
    ```Python hl_lines="4  9-12  25-27"
    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  7. mockwebserver/README.md

    ```
    
    Your unit tests might move the `server` into a field so you can shut it down
    from your test's `tearDown()`.
    
    ### API
    
    #### MockResponse
    
    Mock responses default to an empty response body and a `200` status code.
    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()
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
Back to top