Skip to content

ibmendoza/go-middleware-context

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP Server w/ Context

Example of using package context with HTTP Middleware in Golang

Usage

Run the server:

$ go run main.go

In another terminal cURL the endpoint:

$ curl localhost:8080 -H "X-Request-Id: UNIQUE_REQ_ID"
Hello request: UNIQUE_REQ_ID, from 127.0.0.1

Credits

This codebase was heavily inspired by the following blog posts and repositories:

About

Example of Golang HTTP handlers that use Context in Middleware

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%