- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for post_form (0.17 sec)
-
tests/test_forms_single_param.py
from fastapi import FastAPI, Form from fastapi.testclient import TestClient from typing_extensions import Annotated app = FastAPI() @app.post("/form/") def post_form(username: Annotated[str, Form()]): return username client = TestClient(app) def test_single_form_field(): response = client.post("/form/", data={"username": "Rick"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 05 11:24:36 UTC 2024 - 3.5K bytes - Viewed (0) -
tests/test_forms_single_model.py
username: str lastname: str age: Optional[int] = None tags: List[str] = ["foo", "bar"] alias_with: str = Field(alias="with", default="nothing") @app.post("/form/") def post_form(user: Annotated[FormModel, Form()]): return user client = TestClient(app) def test_send_all_data(): response = client.post( "/form/", data={ "username": "Rick",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 13 09:51:00 UTC 2024 - 3.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostForm.kt
*/ package okhttp3.recipes.kt import java.io.IOException import okhttp3.FormBody import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.OkHttpClient import okhttp3.Request class PostForm { private val client = OkHttpClient() fun run() { val formBody = FormBody.Builder() .add("search", "Jurassic Park") .build() val request = Request(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.3K bytes - Viewed (0) -
cmd/sts-handlers.go
return auth.Credentials{}, ErrAccessDenied } return user, ErrNone } func parseForm(r *http.Request) error { if err := r.ParseForm(); err != nil { return err } for k, v := range r.PostForm { if _, ok := r.Form[k]; !ok { r.Form[k] = v } } return nil } // getTokenSigningKey returns secret key used to sign JWT session tokens func getTokenSigningKey() (string, error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 01:29:20 UTC 2024 - 33.9K bytes - Viewed (0)