Skip to main content

Module http_client

Module http_client 

Source
Expand description

bynk client (#3508, BC1): a typed TypeScript client for a project’s from http services.

The routes, their parameters and their response sets are the facts bynk openapi reads (the wire-contract peek, bynk_ide::wire_contract), so the two cannot disagree on a status or a shape. This module collects them into the generator’s input (bynk_emit::emitter::http_client) and writes the result.

A route the first version cannot represent faithfully is named and left out, never emitted wrong: a raw RequestQuery or RequestCookies view, and a route guarded by a request signature (the client holds no secret).

Structs§

Client
The generated files and the routes they leave out, with why.
Request
What bynk client was asked, from its flags. A flag left out falls back to [build.client] in bynk.toml.

Enums§

Error
Why a client could not be produced.

Functions§

generate
The client for analysis’ from http services named by want (every one when empty).
run
bynk client: analyse the project at root, then write the client, or (with check) say whether what is written is current.
write_configured
bynk build’s share (#3508, [build.client]): write the client when the manifest asks for one, and say so. Nothing happens, and nothing is read beyond the manifest, when it does not.