Skip to content

owenthereal/hurley

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hurley

Hurley and Faraday are both from the lost island.

package main

import "github.com/jingweno/hurley"

type TestHandler struct {
}

func (h *TestHandler) PrepareRequest(req *http.Request) error {
	req.Header.Add("Content-Type", "application/json")
	return nil
}

func (h *TestHandler) PrepareResponse(resp *http.Response) error {
	resp.Status = "201"
	return nil
}

func main() {
  c := hurley.New()
  c.Use(&TestHandler{})
  resp, err := c.Get("https://api.github.com/repos/jingweno/hurley")
}

See test as an example.

About

Hurley and Faraday are both from the lost island

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages