Skip to content

golang-im/rum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Rum

[WIP]

Rum provides middlewares for Golang http.Client. As it is easy to use http handler(server-side) middlewares with Gin, Rum aims to make using client-side middlewares as easy as Gin when use http.Client.

go.dev reference Go

Install

Requirments

Go version 1.13+

Install

go get github.com/YouEclipse/rum

Quick start

import (
	"net/http"
	"github.com/YouEclipse/rum/pkg/rum"
)

func main() {
	httpClient := http.Client{}
	transport := &rum.Transport{}
	m := NewAuthenticationMiddleware()
	transport.Use(m.BasicAuth)

    httpClient.Transport = transport
    ...
}

Features v0.1.0

built-in middlewares

  • cache
  • mock
  • throttle
  • authentication
  • retry
  • open-tracing

...

License

Apache 2.0

About

๐ŸŒ Middlewares for Golang http.Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages