duck2api1616 / httpclient /Iaurorahttpclient.go
ffreemt
Add route prefix /hf
931bd01
raw
history blame
558 Bytes
package httpclient
import (
"io"
"net/http"
)
type AuroraHttpClient interface {
Request(method HttpMethod, url string, headers AuroraHeaders, cookies []*http.Cookie, body io.Reader) (*http.Response, error)
SetProxy(url string) error
}
type HttpMethod string
const (
GET HttpMethod = "GET"
POST HttpMethod = "POST"
PUT HttpMethod = "PUT"
HEAD HttpMethod = "HEAD"
DELETE HttpMethod = "DELETE"
OPTIONS HttpMethod = "OPTIONS"
)
type AuroraHeaders map[string]string
func (a AuroraHeaders) Set(key, value string) {
a[key] = value
}