REGNHTTP
regnhttp is high performance http client (low level) example
install package
go get -u github.com/xsxo/regnhttp
update
go get -u github.com/xsxo/regnhttp@latest
Features
ConnectFunction (create connection with server before send requests)- Reuse Request & Response object instead of creating a new one
- Reuse the same buffer to Reducing pressure on The Garbage Collector by
sync.Pool - No Thread Race | No Data Lose (all objects operate independently)
- Full control of client buffer
cleint.WriteBufferSizeandclient.ReadBufferSize - Full control of connection
client.Connection&client.TLSConfig&client.NagleOff - Full control of objects buffer
Request(bufferSize)andRequest(Response) - Get the request & response as a raw
Request.Raw&Response.Raw
May not for you
- need to know the response & response buffer size
- no support pool connections (to avoid keep save open dead connections)
- no support streaming requests
- no support compresser responses
! the regnhttp package is for normal requests & responses, not for full HTTP protocol support.
For other use cases, net/http may be a better choice, as it fully supports the HTTP protocol
On this page
Languages
Go84.6%C15.4%
Apache License 2.0
Created November 16, 2024
Updated March 5, 2026