Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 185 for Requestbody (0.04 sec)

  1. tests/test_tuples.py

                "/model-with-tuple/": {
                    "post": {
                        "summary": "Post Model With Tuple",
                        "operationId": "post_model_with_tuple_model_with_tuple__post",
                        "requestBody": {
                            "content": {
                                "application/json": {
                                    "schema": {"$ref": "#/components/schemas/ItemGroup"}
                                }
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/PostFile.java

     * limitations under the License.
     */
    package okhttp3.recipes;
    
    import java.io.File;
    import java.io.IOException;
    import okhttp3.MediaType;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.RequestBody;
    import okhttp3.Response;
    
    public final class PostFile {
      public static final MediaType MEDIA_TYPE_MARKDOWN
          = MediaType.get("text/x-markdown; charset=utf-8");
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat May 25 18:02:55 UTC 2019
    - 1.5K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt

    import okhttp3.MultipartBody
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.asRequestBody
    
    class PostMultipart {
      private val client = OkHttpClient()
    
      fun run() {
        // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
        val requestBody =
          MultipartBody
            .Builder()
            .setType(MultipartBody.FORM)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_generate_clients/test_tutorial004.py

                        "tags": [
                            "items",
                        ],
                    },
                    "post": {
                        "operationId": "create_item",
                        "requestBody": {
                            "content": {
                                "application/json": {
                                    "schema": {
                                        "$ref": "#/components/schemas/Item",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  5. tests/test_request_body_parameters_media_type.py

    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    media_type = "application/vnd.api+json"
    
    
    # NOTE: These are not valid JSON:API resources
    # but they are fine for testing requestBody with custom media_type
    class Product(BaseModel):
        name: str
        price: float
    
    
    class Shop(BaseModel):
        name: str
    
    
    @app.post("/products")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_generate_clients/test_tutorial002.py

                    },
                    "post": {
                        "tags": ["items"],
                        "summary": "Create Item",
                        "operationId": "create_item_items__post",
                        "requestBody": {
                            "content": {
                                "application/json": {
                                    "schema": {"$ref": "#/components/schemas/Item"}
                                }
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_files/test_tutorial001_02.py

                "paths": {
                    "/files/": {
                        "post": {
                            "summary": "Create File",
                            "operationId": "create_file_files__post",
                            "requestBody": {
                                "content": {
                                    "multipart/form-data": {
                                        "schema": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/MultipartBodyTest.kt

        body.writeTo(buffer)
        assertThat(body.contentLength()).isEqualTo(buffer.size)
        assertThat(buffer.readUtf8()).isEqualTo(expected)
      }
    
      fun String.toOneShotRequestBody(): RequestBody =
        object : RequestBody() {
          override fun contentType() = null
    
          override fun isOneShot(): Boolean = true
    
          override fun contentLength() = ******@****.***8Size()
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  9. tests/test_request_params/test_file/utils.py

    from typing import Any
    
    
    def get_body_model_name(openapi: dict[str, Any], path: str) -> str:
        body = openapi["paths"][path]["post"]["requestBody"]
        body_schema = body["content"]["multipart/form-data"]["schema"]
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 271 bytes
    - Viewed (0)
  10. tests/test_sub_callbacks.py

                                    "name": "callback_url",
                                    "in": "query",
                                }
                            ],
                            "requestBody": {
                                "content": {
                                    "application/json": {
                                        "schema": {"$ref": "#/components/schemas/Invoice"}
                                    }
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 12.9K bytes
    - Viewed (0)
Back to top