Part type represents a single part from a multipart response. Each part contains headers, a body, and metadata about the content type.
Type definition
json property determines the type of body.
Properties
Indicates whether the part’s body was successfully parsed as JSON.
true: The body is a JavaScript object (typeBody)false: The body is raw data (typeFallback)
content-type: application/json. If parsing succeeds, json is set to true.A key-value object containing all HTTP headers from this part.Header names are normalized to lowercase.Common headers include:
content-type: The MIME type of the partcontent-length: Size of the part body- Custom headers specific to your application
The content of the part. The type depends on the
json property and the environment:When json: true:- Type:
Body(the generic type parameter) - The parsed JavaScript object
json: false:- Browser:
string - Node.js:
Buffer
Environment-specific types
Browser
string.
Node.js
Buffer.