Skip to content
Myr

Add API sketch

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by Tom Christie · parent 8a29a0a · Browse files · 1 file+90 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+90 added−0 removed

  • other:+90 added−0 removed

1 file+90 added−0 removed

added:API.md+90 added
1Client(...)23 .request(method, url, ...)45 .get(url, ...)6 .options(url, ...)7 .head(url, ...)8 .post(url, ...)9 .put(url, ...)10 .patch(url, ...)11 .delete(url, ...)1213 .prepare_request(request)14 .send(request, ...)15 .close()161718Adapter()1920 .prepare_request(request)21 .send(request)22 .close()232425+ EnvironmentAdapter26+ RedirectAdapter27+ CookieAdapter28+ AuthAdapter29+ ConnectionPool30 + HTTPConnection31 + HTTP11Connection32 + HTTP2Connection33343536Response(...)37 .status_code - int38 .reason_phrase - str39 .protocol - "HTTP/2" or "HTTP/1.1"40 .url - URL41 .headers - Headers4243 .content - bytes44 .text - str45 .encoding - str46 .json() - Any4748 .read() - bytes49 .stream() - bytes iterator50 .raw() - bytes iterator51 .close() - None5253 .is_redirect - bool54 .request - Request55 .cookies - Cookies56 .history - List[Response]5758 .raise_for_status()59 .next()606162Request(...)63 .method64 .url65 .headers6667 ...686970Headers7172URL7374Origin7576Cookies777879# Sync8081SyncClient82SyncResponse83SyncRequest84SyncAdapter85868788SSE89HTTP/2 server push support90Concurrency