mordaunt.dev/code

code / nativehttp

nativehttp

Simple interface to the native http client

  • Go
  • Library
  • HTTP
  • Client
  • Native
  • Bindings
  • Networking
  • Cross-Platform
  • Minimal
  • System
clone
https://mordaunt.dev/code/nativehttp
license
Unlicense OR MIT
activity
0 commitsthis year, since 2024

The goal for this package is to provide a minimal effective interface to the native system http client. It is not a goal to support all possible http features.

Support

OS API
Windows WinHttp
macOS tbd
Linux tbd

TinyGo

A secondary goal is to support small binary sizes.

Compile with TinyGo to achieve (at the moment) an ~800KB binary.

Use go-bindsize-treemap to visualize the binary.

This package still makes use of some “heavy” packages, such as “net/url”, “strconv”, “strings”, “reflect” and “fmt”.

Through some effort those packages can be removed to result in a smaller binary. That effort involves copying functions and sometimes re-writing chunks of logic in a light-weight fashion to avoid taking on large dependencies.

Commit log

Mirrored to sourcehut and GitHub.