RequestBody

Methods
3
Fields
None

Getting one

RequestBody.create(…)
RequestBuilder.new():build():body()

Methods

MethodReturnsDescription
contentType()MediaType?The content type, or nil.
contentLength()numberThe length in bytes.
create(MediaType?, string)RequestBodycontent in contentType's charset; a type with no charset gets ; charset=utf-8 added, as OkHttp does. (A Luau string is the text.)

Returned by

MethodReturnsDescription
Request.bodyRequestBody?The body, or nil.
RequestBodyClass.createRequestBodycontent in contentType's charset; a type with no charset gets ; charset=utf-8 added, as OkHttp does. (A Luau string is the text.)

Method details

create

create: (MediaType?, string) -> RequestBody

content in contentType's charset; a type with no charset gets ; charset=utf-8 added, as OkHttp does. (A Luau string is the text.)