Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 94 for Amelia (0.17 sec)

  1. tests/test_request_body_parameters_media_type.py

    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")
    async def create_product(data: Product = Body(media_type=media_type, embed=True)):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/MediaType.kt

      /**
       * Returns a specific media subtype, such as "plain" or "png", "mpeg", "mp4" or "xml".
       */
      @get:JvmName("subtype") val subtype: String,
      /** Alternating parameter names with their values, like `["charset", "utf-8"]`. */
      internal val parameterNamesAndValues: Array<String>,
    ) {
      /**
       * Returns the charset of this media type, or [defaultValue] if either this media type doesn't
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  3. docs/de/docs/reference/responses.md

                - status_code
                - media_type
                - body
                - background
                - raw_headers
                - render
                - init_headers
                - headers
                - set_cookie
                - delete_cookie
    
    ::: fastapi.responses.ORJSONResponse
        options:
            members:
                - charset
                - status_code
                - media_type
                - body
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Feb 19 15:53:39 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  4. docs/en/docs/reference/responses.md

                - status_code
                - media_type
                - body
                - background
                - raw_headers
                - render
                - init_headers
                - headers
                - set_cookie
                - delete_cookie
    
    ::: fastapi.responses.ORJSONResponse
        options:
            members:
                - charset
                - status_code
                - media_type
                - body
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/net/MediaType.java

     * (also known as a MIME Type or Content Type). This class also supports the concept of media ranges
     * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">defined by HTTP/1.1</a>.
     * As such, the {@code *} character is treated as a wildcard and is used to represent any acceptable
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Aug 07 16:17:10 GMT 2023
    - 46.2K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/additional-responses.md

                }
            }
        }
    }
    ```
    
    ## Additional media types for the main response
    
    You can use this same `responses` parameter to add different media types for the same main response.
    
    For example, you can add an additional media type of `image/png`, declaring that your *path operation* can return a JSON object (with media type `application/json`) or a PNG image:
    
    ```Python hl_lines="19-24  28"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  7. fastapi/openapi/utils.py

        )
        field_info = cast(Body, body_field.field_info)
        request_media_type = field_info.media_type
        required = body_field.required
        request_body_oai: Dict[str, Any] = {}
        if required:
            request_body_oai["required"] = required
        request_media_content: Dict[str, Any] = {"schema": body_schema}
        if field_info.openapi_examples:
            request_media_content["examples"] = jsonable_encoder(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt

    private const val QUOTED = "\"([^\"]*)\""
    private val TYPE_SUBTYPE = Regex("$TOKEN/$TOKEN")
    private val PARAMETER = Regex(";\\s*(?:$TOKEN=(?:$TOKEN|$QUOTED))?")
    
    /**
     * Returns a media type for this string.
     *
     * @throws IllegalArgumentException if this is not a well-formed media type.
     */
    internal fun String.commonToMediaType(): MediaType {
      val typeSubtype: MatchResult =
        TYPE_SUBTYPE.matchAtPolyfill(this, 0)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/custom-response.md

    * `content` - A `str` or `bytes`.
    * `status_code` - An `int` HTTP status code.
    * `headers` - A `dict` of strings.
    * `media_type` - A `str` giving the media type. E.g. `"text/html"`.
    
    FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the media_type and appending a charset for text types.
    
    ```Python hl_lines="1  18"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  10. fastapi/params.py

            include_in_schema: bool = True,
            json_schema_extra: Union[Dict[str, Any], None] = None,
            **extra: Any,
        ):
            self.embed = embed
            self.media_type = media_type
            if example is not _Unset:
                warnings.warn(
                    "`example` has been deprecated, please use `examples` instead",
                    category=DeprecationWarning,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
Back to top