Skip to content

streamingfast/dhttp

Repository files navigation

dhttp - StreamingFast HTTP Library

Go HTTP utilities for microservices with integrated logging, tracing, and error handling used in StreamingFast products.

Key Features

  • Request handling: Extract and validate URL parameters, query strings, and JSON payloads
  • Response writing: JSON, text, HTML, and raw responses with proper headers and error logging
  • Error handling: Structured HTTP error responses with tracing support
  • Handler wrappers: Simplified handler patterns for common use cases
  • Utilities: Real IP detection, response forwarding

Core APIs

Handlers

  • JSONHandler - Wrap functions that return JSON responses
  • RawHandler - Stream raw content from io.ReadCloser
  • DirectHandler - Direct response writer control with error handling

Request Processing

Response Writing

Error Types

See full documentation for complete API reference.

About

Various helpers and re-usable stuff to develop HTTP micro-services @ dfuse

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages