Download httpclient/Iaurorahttpclient.go from qwen2api/aurora: direct link, hf CLI and curl.
- Browser
- Download file 651 Bytes
-
https://huggingface.co/spaces/qwen2api/aurora/resolve/main/httpclient/Iaurorahttpclient.go
- Command line
-
hf download hf://spaces/qwen2api/aurora/httpclient/Iaurorahttpclient.go
-
curl -L -o Iaurorahttpclient.go https://huggingface.co/spaces/qwen2api/aurora/resolve/main/httpclient/Iaurorahttpclient.go
651 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 | |
| SetCookies(rawUrl string, cookies []*http.Cookie) | |
| GetCookies(rawUrl string) []*http.Cookie | |
| } | |
| 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 | |
| } | |