Gorequests
No description available
Install / Use
/learn @chyroc/GorequestsREADME
gorequests
Simple and easy-to-use go http client, supports cookies, streaming calls, custom logs and other functions
Install
go get github.com/chyroc/gorequests
Usage
Simple Send Request
func main() {
text, err := gorequests.New(http.MethodGet, "https://jsonplaceholder.typicode.com/todos/1").Text()
if err != nil {
panic(err)
}
fmt.Println("text", text)
}
Send Request With Cookie
func main() {
session := gorequests.NewSession("/tmp/gorequests-session.txt")
text, err := session.New(http.MethodGet, "https://jsonplaceholder.typicode.com/todos/1").Text()
if err != nil {
panic(err)
}
fmt.Println("text", text)
}
Request Factory
func main() {
fac := gorequests.NewFactory(
gorequests.WithLogger(gorequests.NewDiscardLogger()),
)
text, err := fac.New(http.MethodGet, "https://jsonplaceholder.typicode.com/todos/1").Text()
if err != nil {
panic(err)
}
fmt.Println("text", text)
}
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
