Say on send() that an unsaved response's body is call-scoped

This commit is contained in:
Gregory Schier
2026-08-16 10:00:35 -07:00
parent ffa6a610b8
commit 8c72538102
@@ -152,6 +152,15 @@ export interface Context {
render(args: RenderGrpcRequestRequest): Promise<RenderGrpcRequestResponse["grpcRequest"]>;
};
httpRequest: {
/**
* Send a request and wait for the response.
*
* A request with an id is saved, and its body can be read back by response
* id whenever you like. A request without one is not: it is sent, the
* response comes back, and nothing keeps it. Read that body with
* `ctx.httpResponse.body()` before returning — it is only there for the
* rest of this call.
*/
send(args: SendHttpRequestRequest): Promise<SendHttpRequestResponse["httpResponse"]>;
getById(args: GetHttpRequestByIdRequest): Promise<GetHttpRequestByIdResponse["httpRequest"]>;
render(args: RenderHttpRequestRequest): Promise<RenderHttpRequestResponse["httpRequest"]>;