Registry / web-framework / qor-responder

qor-responder

JSON →
library0.0.0-20201015104727-4f3a345378c2gogounverified

A Go library that responds differently based on the request's accepted MIME type.

go get github.com/qor/responder
INSTALL
IMPORT
SIG · QOR-RESPONDER
Q
qor-responder
web-frameworkgov0.0.0-20201015104727-4f3a345378c2
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.

responder
github.com/qor/responder

Responds with HTML or JSON based on the request's Accept header.

package main import ( "net/http" "github.com/qor/responder" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { responder.With("html", "json").Respond(w, r, "Hello") }) http.ListenAndServe(":8080", nil) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20201015104727-4f3a345378c2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
qor-responder — go get qor-responder · libregistry