MCPcopy
hub / github.com/gofiber/fiber / SetJSON

Method SetJSON

client/request.go:409–413  ·  view source on GitHub ↗

SetJSON sets the request body to a JSON-encoded value.

(v any)

Source from the content-addressed store, hash-verified

407
408// SetJSON sets the request body to a JSON-encoded value.
409func (r *Request) SetJSON(v any) *Request {
410 r.body = v
411 r.bodyType = jsonBody
412 return r
413}
414
415// SetXML sets the request body to an XML-encoded value.
416func (r *Request) SetXML(v any) *Request {

Calls

no outgoing calls