Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 394 for responses (0.26 sec)

  1. docs/de/docs/advanced/custom-response.md

    !!! note "Technische Details"
        Sie können auch `from starlette.responses import HTMLResponse` verwenden.
    
        **FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette.
    
    ### `Response`
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 23 13:05:12 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/custom-response.md

        **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette.
    
    ### `Response`
    
    The main `Response` class, all the other responses inherit from it.
    
    You can return it directly.
    
    It accepts the following parameters:
    
    * `content` - A `str` or `bytes`.
    * `status_code` - An `int` HTTP status code.
    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)
  3. tests/test_response_model_as_return_annotation.py

        response = client.get("/no_response_model-no_annotation-return_dict")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "John", "surname": "Doe"}
    
    
    def test_response_model_no_annotation_return_same_model():
        response = client.get("/response_model-no_annotation-return_same_model")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Aug 14 09:49:57 GMT 2023
    - 47.7K bytes
    - Viewed (0)
  4. istioctl/pkg/multixds/gather.go

    			return nil, err
    		}
    		responses = append(responses, resp)
    		return responses, nil
    	}
    
    	return responses, nil
    }
    
    func mergeShards(responses map[string]*discovery.DiscoveryResponse) (*discovery.DiscoveryResponse, error) {
    	retval := discovery.DiscoveryResponse{}
    	if len(responses) == 0 {
    		return &retval, nil
    	}
    
    	for _, response := range responses {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  5. tests/test_response_by_alias.py

        assert response.status_code == 200, response.text
        assert response.json() == {"alias": "Foo"}
    
    
    def test_read_model_by_alias():
        response = client.get("/by-alias/model")
        assert response.status_code == 200, response.text
        assert response.json() == {"alias": "Foo"}
    
    
    def test_read_list_by_alias():
        response = client.get("/by-alias/list")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  6. tests/test_schema_extra_examples.py

        response = client.get("/query_examples/")
        assert response.status_code == 200, response.text
        response = client.get("/query_example_examples/")
        assert response.status_code == 200, response.text
        response = client.get("/header_example/")
        assert response.status_code == 200, response.text
        response = client.get("/header_examples/")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
  7. src/main/config/openapi/openapi-user.yaml

            '400':
              $ref: '#/components/responses/BadRequest'
            '401':
              $ref: '#/components/responses/Unauthorized'
            '404':
              $ref: '#/components/responses/NotFound'
            '500':
              $ref: '#/components/responses/InternalServerError'
    
    components:
      responses:
        BadRequest:
          description: Bad request
          content:
    Others
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Mon Jun 19 13:30:00 GMT 2023
    - 21.6K bytes
    - Viewed (1)
  8. fastapi/openapi/utils.py

        if isinstance(route.response_class, DefaultPlaceholder):
            current_response_class: Type[Response] = route.response_class.value
        else:
            current_response_class = route.response_class
        assert current_response_class, "A response class is needed to generate OpenAPI"
        route_response_media_type: Optional[str] = current_response_class.media_type
        if route.include_in_schema:
    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)
  9. okhttp/src/main/kotlin/okhttp3/Cache.kt

          }
        }
    
        constructor(response: Response) {
          this.url = response.request.url
          this.varyHeaders = response.varyHeaders()
          this.requestMethod = response.request.method
          this.protocol = response.protocol
          this.code = response.code
          this.message = response.message
          this.responseHeaders = response.headers
          this.handshake = response.handshake
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  10. internal/grid/muxclient.go

    	// Space for one message and an error.
    	responseCh := make(chan Response, 1)
    
    	// Spawn simple disconnect
    	if requests == nil {
    		go m.handleOneWayStream(responseCh, responses)
    		return &Stream{responses: responseCh, Requests: nil, ctx: m.ctx, cancel: m.cancelFn, muxID: m.MuxID}, nil
    	}
    
    	// Deliver responses and send unblocks back to the server.
    	go m.handleTwowayResponses(responseCh, responses)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
Back to top