GOLF(2gg)
π NAME
request-body β it's giving (request-data) π
π PURPOSE
Bestie, we're grabbing the body of an HTTP request. That's it. That's the whole job. β¨
πΈ SYNTAX
request-body <request body>
π¦ DESCRIPTION
Okay so request-body takes the body of an HTTP request and tucks it into the string <request body>. Iconic, no notes. π
Now here's the tea: if the content type of the request is "multipart/form-data", the request body comes back empty. Not a glitch, not a bug β it's because literally all the data (including any attached files, yes even those) can be snagged using get-param instead (peep file-uploading if you're here for the files π). In every other case? The request body is available. Periodt.
Typical use of request-body is when some text or binary info is attached to the request β JSON is the classic example, but honestly it can be anything else, like an image, some text, or a PDF document. The vibes are flexible. π
Usually the request body is present for POST, PUT or PATCH requests, but you can also obtain it for GET or DELETE requests if it's supplied (for instance, identifying a resource may require more information than can fit in a query string, iykyk), or for any custom request method you feel like inventing. Main character energy, truly. π
π₯ EXAMPLES
String variable "reqb" will hold request body of a request:
request-body reqb
π SEE ALSO
- Request data
get-paramrequest-bodyset-param- See all documentation
That's the whole page, bestie β go slay some HTTP requests π«Ά
Cute little sign-off: this was $VERSION, dated $DATE, and yeah it's from GOLF(2gg), Development section. Mwah. π
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms