Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/reoring/quickproxy

Go Library for a easy HTTP proxy
https://github.com/reoring/quickproxy

Last synced: 8 days ago
JSON representation

Go Library for a easy HTTP proxy

Awesome Lists containing this project

README

        

Go Library for a easy HTTP proxy
==========

Go Library for a easy HTTP proxy

## Examples

### Record request/response elapsed time.

```go
package main

import (
"fmt"
"github.com/reoring/quickproxy"
)

func main() {
quickproxy.Prepare(map[string]string{"port": "8081"})

quickproxy.OnDone(func(doneRequestData *quickproxy.DoneRequestData) {
fmt.Print(doneRequestData.Request.URL)
fmt.Print(": ")
fmt.Print(doneRequestData.RoundTripTime.ElapsedTime())
fmt.Print("\n")
})

quickproxy.Run()
}
```