- Sort Score
- Result 10 results
- Languages All
Results 1041 - 1050 of 1,726 for ujson (0.03 sec)
-
docs/ko/docs/advanced/response-directly.md
# 응답을 직접 반환하기 **FastAPI**에서 *경로 작업(path operation)*을 생성할 때, 일반적으로 `dict`, `list`, Pydantic 모델, 데이터베이스 모델 등의 데이터를 반환할 수 있습니다. 기본적으로 **FastAPI**는 [JSON 호환 가능 인코더](../tutorial/encoder.md){.internal-link target=_blank}에 설명된 `jsonable_encoder`를 사용해 해당 반환 값을 자동으로 `JSON`으로 변환합니다. 그런 다음, JSON 호환 데이터(예: `dict`)를 `JSONResponse`에 넣어 사용자의 응답을 전송하는 방식으로 처리됩니다. 그러나 *경로 작업*에서 `JSONResponse`를 직접 반환할 수도 있습니다. 예를 들어, 사용자 정의 헤더나 쿠키를 반환해야 하는 경우에 유용할 수 있습니다.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 30 20:00:57 UTC 2024 - 3.4K bytes - Viewed (0) -
docs/zh/docs/advanced/response-directly.md
# 直接返回响应 当你创建一个 **FastAPI** *路径操作* 时,你可以正常返回以下任意一种数据:`dict`,`list`,Pydantic 模型,数据库模型等等。 **FastAPI** 默认会使用 `jsonable_encoder` 将这些类型的返回值转换成 JSON 格式,`jsonable_encoder` 在 [JSON 兼容编码器](../tutorial/encoder.md){.internal-link target=_blank} 中有阐述。 然后,**FastAPI** 会在后台将这些兼容 JSON 的数据(比如字典)放到一个 `JSONResponse` 中,该 `JSONResponse` 会用来发送响应给客户端。 但是你可以在你的 *路径操作* 中直接返回一个 `JSONResponse`。 直接返回响应可能会有用处,比如返回自定义的响应头和 cookies。 ## 返回 `Response`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.1K bytes - Viewed (0) -
internal/config/heal/heal.go
type Config struct { // Bitrot will perform bitrot scan on local disk when checking objects. Bitrot string `json:"bitrotscan"` // maximum sleep duration between objects to slow down heal operation. Sleep time.Duration `json:"sleep"` IOCount int `json:"iocount"` DriveWorkers int `json:"drive_workers"` // Cached value from Bitrot field cache struct {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 4.9K bytes - Viewed (0) -
docs_src/settings/app02/test_main.py
return Settings(admin_email="******@****.***") app.dependency_overrides[get_settings] = get_settings_override def test_app(): response = client.get("/info") data = response.json() assert data == { "app_name": "Awesome API", "admin_email": "******@****.***", "items_per_user": 50,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 29 09:26:07 UTC 2021 - 515 bytes - Viewed (0) -
docs/sts/web-identity.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import logging import urllib from uuid import uuid4 import boto3 import requests from botocore.client import Config from flask import Flask, request boto3.set_stream_logger('boto3.resources', logging.DEBUG) authorize_url = "http://localhost:8080/auth/realms/minio/protocol/openid-connect/auth" token_url = "http://localhost:8080/auth/realms/minio/protocol/openid-connect/token"
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 28 01:37:51 UTC 2021 - 2.9K bytes - Viewed (0) -
README.md
---------------- 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); Request request = new Request.Builder() .url(url) .post(body) .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 6.2K bytes - Viewed (0) -
cmd/iam-object-store.go
return iamOS.usersSysType } func (iamOS *IAMObjectStore) saveIAMConfig(ctx context.Context, item interface{}, objPath string, opts ...options) error { json := jsoniter.ConfigCompatibleWithStandardLibrary data, err := json.Marshal(item) if err != nil { return err } if GlobalKMS != nil { data, err = config.EncryptBytes(GlobalKMS, data, kms.Context{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 23:40:37 UTC 2024 - 26.6K bytes - Viewed (0) -
docs/ja/docs/advanced/response-directly.md
# レスポンスを直接返す **FastAPI** の *path operation* では、通常は任意のデータを返すことができます: 例えば、 `dict`、`list`、Pydanticモデル、データベースモデルなどです。 デフォルトでは、**FastAPI** は [JSON互換エンコーダ](../tutorial/encoder.md){.internal-link target=_blank} で説明されている `jsonable_encoder` により、返す値を自動的にJSONに変換します。 このとき背後では、JSON互換なデータ (例えば`dict`) を、クライアントへ送信されるレスポンスとして利用される `JSONResponse` の中に含めます。 しかし、*path operation* から `JSONResponse` を直接返すこともできます。 これは例えば、カスタムヘッダーやcookieを返すときに便利です。 ## `Response` を返す
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.6K bytes - Viewed (0) -
tests/test_include_route.py
app.include_router(router) client = TestClient(app) def test_sub_router(): response = client.get("/items/") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Apr 08 04:37:38 UTC 2020 - 496 bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt
import okio.Path.Companion.toPath import okio.buffer import okio.fakefilesystem.FakeFileSystem class PostPath { private val client = OkHttpClient() private val fileSystem = FakeFileSystem() val path = "test.json".toPath() fun run() { fileSystem.write(path) { writeUtf8("{}") } val request = Request.Builder() .url("https://httpbin.org/anything")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0)