MCPcopy Index your code
hub / github.com/imroc/req / SetBodyString

Method SetBodyString

request.go:910–912  ·  view source on GitHub ↗

SetBodyString set the request Body as string.

(body string)

Source from the content-addressed store, hash-verified

908
909// SetBodyString set the request Body as string.
910func (r *Request) SetBodyString(body string) *Request {
911 return r.SetBodyBytes([]byte(body))
912}
913
914// SetBodyJsonString set the request Body as string and set Content-Type header
915// as "application/json; charset=utf-8"

Callers 4

SetBodyMethod · 0.95
handleOrderedFormDataFunction · 0.45
SetBodyStringFunction · 0.45
TestSetBodyFunction · 0.45

Calls 1

SetBodyBytesMethod · 0.95

Tested by 1

TestSetBodyFunction · 0.36