HTTP (Effect's effect/http).
Client:
client: theHttpClientservice, its combinators,makeandlayer_testhttpx_client: anHttpClienton httpx (pyfect-dev[httpx])request/response: requests and responsesbody,headers,url_params,url,cookies,method: the values they are made oferror:HttpClientErrorand its reasonstrace_context:traceparent/b3headers
Server:
server: theHttpServerservice,serveand the test client;live_server: the stdlib HTTP/1.1 server behind it;uvicorn_server: one on uvicorn (pyfect-dev[server]);hypercorn_server: one that also speaks HTTP/2 (pyfect-dev[http2])asgi: apps as ASGI applications (to_asgi), and ASGI applications (FastAPI, Starlette) as apps (from_asgi)server_request/server_response/server_error/server_respondable: what a handler reads, returns and fails withrouter(onfind_my_way),middleware,http_effect,web_handler: building and running appsorigin: which browser origins may open WebSockets and call RPCs (same-origin by default)platform,static_server,multipart,etag,mime,template,statusprometheus: the metrics registry as a scrape endpointproblem_details: RFC 9457 problem bodies (application/problem+json)
::
from pyfect.http import client, httpx_client, response
@fx.fn
def program():
res = yield from client.get("https://example.com")
return (yield from res.text)
fx.run_blocking(program().pipe(fx.provide(httpx_client.layer)))Re-exports#
- From
pyfect.http.client:HttpClient,HttpClientService - From
pyfect.http.error:HttpClientError - From
pyfect.http.request:HttpClientRequest - From
pyfect.http.response:HttpClientResponse
Modules#
abortbodycookieserroretagfile_likeheadershttp_effecthttpx_clienthypercorn_serverincoming_messagemethodmultipartoriginplatformproblem_detailsprometheusrequestresponseschemaserverserver_errorserver_requestserver_respondableserver_responsestatustemplatetrace_contexturlurl_paramsuvicorn_serverwebweb_handlerwireasgiclientfind_my_waylive_servermiddlewaremimemultipart_parserrouterstatic_server