Registry / http-client / dghubble-sling

dghubble-sling

JSON →
library1.4.2gogounverified

A Go HTTP client library for creating and sending API requests with a fluent builder pattern.

go get github.com/dghubble/sling
INSTALL
IMPORT
SIG · DGHUBBLE-SLING
D
dghubble-sling
http-clientgov1.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sling
github.com/dghubble/sling

Performs a GET request and decodes JSON response into a struct.

package main import ( "fmt" "github.com/dghubble/sling" "net/http" ) func main() { type Result struct { Args map[string]string `json:"args"` } result := new(Result) resp, err := sling.New().Get("https://httpbin.org/get").ReceiveSuccess(result) if err != nil { panic(err) } fmt.Println(resp.StatusCode, result.Args) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.4.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources
dghubble-sling — go get dghubble-sling · libregistry