| Age | Commit message (Collapse) | Author |
|
The RegisterHandleFunc register a pattern with a handler, similar to
[http.ServeMux.HandleFunc].
The pattern follow the Go 1.22 format:
[METHOD] PATH
The METHOD is optional, default to GET.
The PATH must not contains the domain name and space.
Unlike standard library, variable in PATH is read using ":var" not
"{var}".
This endpoint will accept any content type and return the body as is;
it is up to the handler to read and set the content type and the response
headers.
If the METHOD and/or PATH is already registered it will panic.
|
|
Instead of returning three variables, [http.Response], []byte, and error,
we combine the [http.Response] and []byte into single struct:
ClientResponse.
|
|
|
|
The NewServer and NewClient now accept non-pointer options, so the
caller unable to modify the options once the server or client has
been created.
|
|
If the type is in CamelCase the file should be using snake_case.
|