An open API service indexing awesome lists of open source software.

https://github.com/databus23/requestutil

A go helper to extract information from http.Request objects
https://github.com/databus23/requestutil

Last synced: over 1 year ago
JSON representation

A go helper to extract information from http.Request objects

Awesome Lists containing this project

README

          

[![Build Status](https://travis-ci.org/databus23/requestutil.png?branch=master)](https://travis-ci.org/databus23/requestutil)

requestutil
===========
Requestutil is a small go library for extracting host, port and scheme information from a `http.Request`.
It is usefully for generating absolute urls and considers headers set by loadbalancers (e.g. `X-Forwarded-Host` ...)

It is inspired by [ActionDispatch::Http::URL](http://api.rubyonrails.org/classes/ActionDispatch/Http/URL.html)