- Sort Score
- Result 10 results
- Languages All
Results 661 - 670 of 1,804 for request_ (0.11 sec)
-
docs/en/docs/advanced/templates.md
</div> ## Using `Jinja2Templates` * Import `Jinja2Templates`. * Create a `templates` object that you can reuse later. * Declare a `Request` parameter in the *path operation* that will return a template. * Use the `templates` you created to render and return a `TemplateResponse`, pass the name of the template, the request object, and a "context" dictionary with key-value pairs to be used inside of the Jinja2 template. ```Python hl_lines="4 11 15-18"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs/zh/docs/advanced/templates.md
* 导入 `Jinja2Templates` * 创建可复用的 `templates` 对象 * 在返回模板的*路径操作*中声明 `Request` 参数 * 使用 `templates` 渲染并返回 `TemplateResponse`, 传递模板的名称、request对象以及一个包含多个键值对(用于Jinja2模板)的"context"字典, ```Python hl_lines="4 11 15-16" {!../../docs_src/templates/tutorial001.py!} ``` /// note | "笔记" 在FastAPI 0.108.0,Starlette 0.29.0之前,`name`是第一个参数。 并且,在此之前,`request`对象是作为context的一部分以键值对的形式传递的。 /// /// tip | "提示"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.8K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java
ModelBuildingRequest request, ModelProblemCollector problems) { model.update( injectProfile(model.getDelegate(), profile != null ? profile.getDelegate() : null, request, problems)); } @Override public Model injectProfile( Model model, Profile profile, ModelBuildingRequest request, ModelProblemCollector problems) {
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 10.3K bytes - Viewed (0) -
cmd/signature-v2_test.go
query := url.Values{} for key, value := range testCase.queryParams { query.Set(key, value) } // Create a request to use. req, err := http.NewRequest(http.MethodGet, "http://host/a/b?"+query.Encode(), nil) if err != nil { t.Errorf("(%d) failed to create http.Request, got %v", i, err) } if testCase.expected != ErrNone { // Should be set since we are simulating a http server.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 14 10:08:40 UTC 2022 - 8K bytes - Viewed (0) -
docs/pt/docs/advanced/templates.md
## Usando `Jinja2Templates` * Importe `Jinja2Templates`. * Crie um `templates` que você possa reutilizar posteriormente. * Declare um parâmetro `Request` no *path operation* que retornará um template. * Use o `template` que você criou para renderizar e retornar uma `TemplateResponse`, passe o nome do template, o request object, e um "context" dict com pares chave-valor a serem usados dentro do template do Jinja2. ```Python hl_lines="4 11 15-18"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs_src/wsgi/tutorial001.py
from fastapi import FastAPI from fastapi.middleware.wsgi import WSGIMiddleware from flask import Flask, request from markupsafe import escape flask_app = Flask(__name__) @flask_app.route("/") def flask_main(): name = request.args.get("name", "World") return f"Hello, {escape(name)} from Flask!" app = FastAPI() @app.get("/v2") def read_main(): return {"message": "Hello World"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue May 09 14:32:00 UTC 2023 - 443 bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java
} request.setToolchains(groupedToolchains); } return request; } @Override public MavenExecutionRequest populateDefaults(MavenExecutionRequest request) throws MavenExecutionRequestPopulationException { baseDirectory(request); localRepository(request); populateDefaultPluginGroups(request); return request; }
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 8.4K bytes - Viewed (0) -
okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt
assertThat(request.url.toString()).isEqualTo("http://example.com/") assertThat(request.body!!.contentLength()).isEqualTo(3) } @Test fun dataPost() { val request = fromArgs("-d", "foo", "http://example.com").createRequest() val body = request.body assertThat(request.method).isEqualTo("POST") assertThat(request.url.toString()).isEqualTo("http://example.com/")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.3K bytes - Viewed (0) -
internal/handlers/proxy_test.go
} for _, v := range headers { req := &http.Request{ Header: http.Header{ v.key: []string{v.val}, }, } res := GetSourceScheme(req) if res != v.expected { t.Errorf("wrong header for %s: got %s want %s", v.key, res, v.expected) } } } // TestGetSourceIP - check the source ip of a request is parsed correctly. func TestGetSourceIP(t *testing.T) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Dec 22 00:56:55 UTC 2023 - 3.2K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/path/ModelUrlNormalizer.java
* * @param model The model whose URLs should be normalized, may be {@code null}. * @param request The model building request that holds further settings, must not be {@code null}. */ void normalize(Model model, ModelBuildingRequest request);
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 1.5K bytes - Viewed (0)