Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 694 for statusFn (0.05 sec)

  1. docs/en/docs/tutorial/handling-errors.md

    * The item the client was trying to access doesn't exist.
    * etc.
    
    In these cases, you would normally return an **HTTP status code** in the range of **400** (from 400 to 499).
    
    This is similar to the 200 HTTP status codes (from 200 to 299). Those "200" status codes mean that somehow there was a "success" in the request.
    
    The status codes in the 400 range mean that there was an error from the client.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  2. internal/bucket/lifecycle/rule.go

    package lifecycle
    
    import (
    	"bytes"
    	"encoding/xml"
    )
    
    // Status represents lifecycle configuration status
    type Status string
    
    // Supported status types
    const (
    	Enabled  Status = "Enabled"
    	Disabled Status = "Disabled"
    )
    
    // Rule - a rule for lifecycle configuration.
    type Rule struct {
    	XMLName             xml.Name            `xml:"Rule"`
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  3. cmd/kms-router.go

    	if err != nil {
    		// Static params, so this is very unlikely.
    		logger.Fatal(err, "Unable to initialize server")
    	}
    
    	for _, version := range KMSVersions {
    		// KMS Status APIs
    		kmsRouter.Methods(http.MethodGet).Path(version + "/status").HandlerFunc(gz(httpTraceAll(kmsAPI.KMSStatusHandler)))
    		kmsRouter.Methods(http.MethodGet).Path(version + "/metrics").HandlerFunc(gz(httpTraceAll(kmsAPI.KMSMetricsHandler)))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  4. docs_src/security/tutorial007_an.py

    import secrets
    
    from fastapi import Depends, FastAPI, HTTPException, status
    from fastapi.security import HTTPBasic, HTTPBasicCredentials
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    security = HTTPBasic()
    
    
    def get_current_username(
        credentials: Annotated[HTTPBasicCredentials, Depends(security)],
    ):
        current_username_bytes = credentials.username.encode("utf8")
        correct_username_bytes = b"stanleyjobson"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  5. docs_src/response_change_status_code/tutorial001.py

    from fastapi import FastAPI, Response, status
    
    app = FastAPI()
    
    tasks = {"foo": "Listen to the Bar Fighters"}
    
    
    @app.put("/get-or-create-task/{task_id}", status_code=200)
    def get_or_create_task(task_id: str, response: Response):
        if task_id not in tasks:
            tasks[task_id] = "This didn't exist before"
            response.status_code = status.HTTP_201_CREATED
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 391 bytes
    - Viewed (0)
  6. docs_src/path_operation_configuration/tutorial001.py

    from typing import Set, Union
    
    from fastapi import FastAPI, status
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
    
    
    @app.post("/items/", response_model=Item, status_code=status.HTTP_201_CREATED)
    async def create_item(item: Item):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 406 bytes
    - Viewed (0)
  7. docs/ru/docs/tutorial/path-operation-configuration.md

    ////
    
    Этот код состояния будет использован в ответе и будет добавлен в схему OpenAPI.
    
    /// note | "Технические детали"
    
    Вы также можете использовать `from starlette import status`.
    
    **FastAPI** предоставляет тот же `starlette.status` под псевдонимом `fastapi.status` для удобства разработчика. Но его источник - это непосредственно Starlette.
    
    ///
    
    ## Теги
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/path-operation-configuration.md

    ////
    
    Dieser Statuscode wird in der Response verwendet und zum OpenAPI-Schema hinzugefügt.
    
    /// note | "Technische Details"
    
    Sie können auch `from starlette import status` verwenden.
    
    **FastAPI** bietet dieselben `starlette.status`-Codes auch via `fastapi.status` an, als Annehmlichkeit für Sie, den Entwickler. Sie kommen aber direkt von Starlette.
    
    ///
    
    ## Tags
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  9. src/test/resources/before_script.sh

    ./fess-*/bin/fess > ${temp_log_file} 2>&1 &
    
    temp_json_file=/tmp/fess-log.$$
    touch ${temp_json_file}
    error_count=0
    while true ; do
      status=$(curl -w '%{http_code}\n' -s -o ${temp_json_file} "http://localhost:8080/api/v1/health")
      cat ${temp_json_file}
      if [[ x"${status}" = x200 ]] ; then
        break
      else
        error_count=$((error_count + 1))
      fi
      if [[ ${error_count} -ge 60 ]] ; then
        echo "Fess is not available."
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Sat Feb 10 03:25:34 UTC 2024
    - 863 bytes
    - Viewed (0)
  10. docs_src/additional_status_codes/tutorial001_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Body, FastAPI, status
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: Annotated[Union[str, None], Body()] = None,
        size: Annotated[Union[int, None], Body()] = None,
    ):
        if item_id in items:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 705 bytes
    - Viewed (0)
Back to top