Skip to content

Http package

This package provides HTTP client and server.

{
  "type": "system"
}

Install

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

Http'Client module

This module provides an HTTP client.

Types

No types are defined.

Functions

Send

Send an HTTP request.

\(ctx Context, r Request) Response | error

Http'Context module

Types

Context

An HTTP context

type Context = context'Context

Functions

No functions are defined.

Http'Request module

Types

Request

An HTTP request

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

Functions

No functions are defined.

Http'Response module

Types

Response

An HTTP response

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

Functions

No functions are defined.

Http'Server module

This module provides an HTTP server.

Types

No types are defined.

Functions

Serve

Run an HTTP service.

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