Skip to main content

Module http

Module http 

Source
Expand description

HTTP DspClient implementation — real reqwest::blocking client.

§DSP-API login endpoint (confirmed from AuthenticationEndpointsV2.scala)

URL: POST {server}/v2/authentication

Request body: JSON with one identifier key (email, username, or iri) plus a password key. The CLI auto-detects the identifier type from the --user value and sends the matching key: an http(s):// prefix is treated as a user IRI, a value containing @ as an email address, and anything else as a username. See identifier_key for the heuristic.

Example (email): { "email": "<value>", "password": "<password>" }

Response body (200):

{ "token": "<jwt-string>" }

Token only — no user, no expires_at in the response. The user identity is echoed back from the --user argument; expiry is extracted from the JWT via extract_exp.

Error status codes: 401 for bad credentials (treat 401 and 403 alike).

Credentials travel in the POST JSON body, not in the URL or in any header that reqwest’s built-in debug logging captures (i.e. not Authorization header).

Structs§

HttpDspClient
Real HTTP implementation of DspClient, backed by reqwest::blocking.