- Sort Score
- Result 10 results
- Languages All
Results 661 - 670 of 962 for Encode (0.08 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) -
schema/naming.go
package schema import ( "crypto/sha1" "encoding/hex" "regexp" "strings" "unicode/utf8" "github.com/jinzhu/inflection" "golang.org/x/text/cases" "golang.org/x/text/language" ) // Namer namer interface type Namer interface { TableName(table string) string SchemaName(table string) string ColumnName(table, column string) string JoinTableName(joinTable string) string RelationshipFKName(Relationship) string
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 5.3K bytes - Viewed (0) -
cmd/batch-expire.go
} var _ yaml.Unmarshaler = &BatchJobExpirePurge{} // UnmarshalYAML - BatchJobExpirePurge extends unmarshal to extract line, col func (p *BatchJobExpirePurge) UnmarshalYAML(val *yaml.Node) error { type purge BatchJobExpirePurge var tmp purge err := val.Decode(&tmp) if err != nil { return err } *p = BatchJobExpirePurge(tmp) p.line, p.col = val.Line, val.Column return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 18 17:59:03 UTC 2024 - 21.9K bytes - Viewed (0) -
internal/crypto/error.go
// MD5 checksum. ErrMissingCustomerKeyMD5 = Errorf("The SSE-C request is missing the customer key MD5") // ErrInvalidCustomerKey indicates that the SSE-C client key is not valid - e.g. not a // base64-encoded string or not 256 bits long. ErrInvalidCustomerKey = Errorf("The SSE-C client key is invalid") // ErrSecretKeyMismatch indicates that the provided secret key (SSE-C client key / SSE-S3 KMS key)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 4.4K bytes - Viewed (0) -
src/bytes/reader.go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bytes import ( "errors" "io" "unicode/utf8" ) // A Reader implements the [io.Reader], [io.ReaderAt], [io.WriterTo], [io.Seeker], // [io.ByteScanner], and [io.RuneScanner] interfaces by reading from // a byte slice.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Jul 16 18:17:37 UTC 2024 - 3.9K bytes - Viewed (0) -
src/main/java/jcifs/smb1/ntlmssp/NtlmFlags.java
*/ package jcifs.smb1.ntlmssp; /** * Flags used during negotiation of NTLMSSP authentication. */ public interface NtlmFlags { /** * Indicates whether Unicode strings are supported or used. */ public static final int NTLMSSP_NEGOTIATE_UNICODE = 0x00000001; /** * Indicates whether OEM strings are supported or used. */
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 20:39:42 UTC 2019 - 5.3K bytes - Viewed (0) -
cmd/bitrot.go
if !algorithm.Available() { continue } checksum, err := hex.DecodeString(checksums[algorithm]) if err != nil { logger.Fatal(errSelfTestFailure, fmt.Sprintf("bitrot: failed to decode %v checksum %s for selftest: %v", algorithm, checksums[algorithm], err)) } var ( hash = algorithm.New() msg = make([]byte, 0, hash.Size()*hash.BlockSize()) sum = make([]byte, 0, hash.Size()) )
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.6K bytes - Viewed (0) -
istioctl/pkg/writer/compare/sds/util.go
return []SecretItem{}, fmt.Errorf("error building secret: %v", err) } return []SecretItem{secret}, nil } func secretMetaFromCert(rawCert []byte, trustDomain string) (SecretMeta, error) { block, _ := pem.Decode(rawCert) if block == nil { return SecretMeta{}, fmt.Errorf("failed to parse certificate PEM") } cert, err := x509.ParseCertificate(block.Bytes) if err != nil { return SecretMeta{}, err }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Oct 28 19:52:53 UTC 2024 - 8.5K bytes - Viewed (0) -
guava/src/com/google/common/net/InetAddresses.java
* <dt>From the IPv6 reserved documentation prefix ({@code 2001:db8::/32}), {@code "2001:db8::1"}. * <dd>{@code 20 01 0d b8 00 00 00 00 00 00 00 00 00 00 00 01} * <dt>An IPv6 "IPv4 compatible" (or "compat") address, {@code "::192.168.0.1"}. * <dd>{@code 00 00 00 00 00 00 00 00 00 00 00 00 c0 a8 00 01} * <dt>An IPv6 "IPv4 mapped" address, {@code "::ffff:192.168.0.1"}. * <dd>{@code 00 00 00 00 00 00 00 00 00 00 ff ff c0 a8 00 01} * </dl> *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 47.1K bytes - Viewed (0)