- Sort Score
- Result 10 results
- Languages All
Results 371 - 380 of 1,032 for cend (0.04 sec)
-
tests/test_tutorial/test_background_tasks/test_tutorial001.py
from docs_src.background_tasks.tutorial001 import app client = TestClient(app) def test(): log = Path("log.txt") if log.is_file(): os.remove(log) # pragma: no cover response = client.post("/send-notification/******@****.***") assert response.status_code == 200, response.text assert response.json() == {"message": "Notification sent in the background"} with open("./log.txt") as f:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 578 bytes - Viewed (0) -
fastapi/background.py
def write_notification(email: str, message=""): with open("log.txt", mode="w") as email_file: content = f"notification for {email}: {message}" email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks): background_tasks.add_task(write_notification, email, message="some notification")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 1.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/AppendableWriterTest.java
} @Override public Appendable append(char c) { result.append(c); return this; } @Override public Appendable append(CharSequence csq, int start, int end) { result.append(csq, start, end); return this; } @Override public void flush() { flushed = true; } @Override public void close() { closed = true; } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_background_tasks/test_tutorial002_an.py
from docs_src.background_tasks.tutorial002_an import app client = TestClient(app) def test(): log = Path("log.txt") if log.is_file(): os.remove(log) # pragma: no cover response = client.post("/send-notification/******@****.***?q=some-query") assert response.status_code == 200, response.text assert response.json() == {"message": "Message sent"} with open("./log.txt") as f:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 571 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an_py310.py
def get_query(background_tasks: BackgroundTasks, q: str | None = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q @app.post("/send-notification/{email}") async def send_notification( email: str, background_tasks: BackgroundTasks, q: Annotated[str, Depends(get_query)] ): message = f"message to {email}\n"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 683 bytes - Viewed (0) -
helm/minio/templates/serviceaccount.yaml
{{- if .Values.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ .Values.serviceAccount.name | quote }}
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat May 06 20:34:58 UTC 2023 - 147 bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/tls/BasicCertificateChainCleaner.kt
for (c in 0 until MAX_SIGNERS) { val toVerify = result[result.size - 1] as X509Certificate // If this cert has been signed by a trusted cert, use that. Add the trusted certificate to // the end of the chain unless it's already present. (That would happen if the first // certificate in the chain is itself a self-signed and trusted CA certificate.) val trustedCert = trustRootIndex.findByIssuerAndSignature(toVerify)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.8K bytes - Viewed (0) -
docs/sts/tls.md
``` ## Example MinIO exposes a custom S3 STS API endpoint as `Action=AssumeRoleWithCertificate`. A client has to send an HTTP `POST` request to `https://<host>:<port>?Action=AssumeRoleWithCertificate&Version=2011-06-15`. Since the authentication and authorization happens via X.509 certificates the client has to send the request over **TLS** and has to provide a client certificate.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 29 04:28:45 UTC 2022 - 6K bytes - Viewed (1) -
internal/grid/handlers.go
h.PutResponse(resp) } if err != nil { PutByteBuffer(payload) r := RemoteErr(err.Error()) return nil, &r } return payload, nil }, subroute...) } // Requester is able to send requests to a remote. type Requester interface { Request(ctx context.Context, h HandlerID, req []byte) ([]byte, error) } // Call the remote with the request and return the response.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 27.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt
import okio.Buffer import okio.BufferedSource import okio.ByteString import okio.Source import okio.Timeout /** * Reads HTTP/2 transport frames. * * This implementation assumes we do not send an increased [frame][Settings.getMaxFrameSize] to the * peer. Hence, we expect all frames to have a max length of [Http2.INITIAL_MAX_FRAME_SIZE]. */ class Http2Reader(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 19.9K bytes - Viewed (0)