Skip to content

Procedures: Add HTTP API #3517

Closed
Closed

Description

@gefjon

Add a single new host call for performing an HTTP request, procedure_http_request. Its signature is approximately:

extern "C" fn procedure_http_request(req: *const u8, req_len: u32, out: *mut BytesSource) -> Errno;

The (req, req_len) buffer encodes an HttpRequest object. Decide whether this should be re-exported from the http crate, some other crate, or our own custom type. Justify your choice in the PR description.

The out BytesSource has meaning depending on the return value: if the call returns ok, out yields an HttpResponse object. (This may be an HTTP error response; the call assigns no semantics to HTTP responses whatsoever.) If the call returns an error, out yields an HttpError further describing the failure.

Wrap this up in a method on ProcedureContext which handles the ser/de parts. Its signature is approximately:

impl ProcedureContext {
    pub fn http(&mut self, req: HttpRequest) -> Result<HttpResponse, HttpError> { todo!() }
}

Then make follow-up tickets to expose the same interface in C#, C++ and TypeScript.

Activity

  1. added a commit that references this issue on Nov 20, 2025
    7df8719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions