Skip to content

Http

This package provides HTTP client and server.

{
"type": "system"
}
{
"dependencies": {
"Http": "pen:///http"
}
}

This module provides an HTTP client.

No types are defined.

Send an HTTP request.

\(ctx Context, r Request) Response | error

An HTTP context

type Context = context'Context

No functions are defined.

An HTTP request

type Request {
Method string
Uri string
Headers {string: string}
Body string
}

No functions are defined.

An HTTP response

type Response {
Status number
Headers {string: string}
Body string
}

No functions are defined.

This module provides an HTTP server.

No types are defined.

Run an HTTP service.

\(ctx Context, address string, callback \(Request) Response) none | error