HttpMessageType
Adds extension methods to HttpMessage for building messages with various content types.
Value members
Concrete methods
Creates new message with content from supplied file as message body.
Creates new message with content from supplied file as message body.
After adding body to message, the Content-Type header is set based on file type, and Content-Length is set to file size.
- Value Params
- file
message body
Creates new message with supplied form data as message body.
Creates new message with supplied form data as message body.
After adding body to message, the Content-Type header is set to
application/x-www-form-urlencoded
, and Content-Length is set to length
of encoded form data.
- Value Params
- data
message body
Creates new message with supplied form data as message body.
Creates new message with supplied form data as message body.
After adding body to message, the Content-Type header is set to
application/x-www-form-urlencoded
, and Content-Length is set to length
of encoded form data.
- Value Params
- data
message body
Creates new message with supplied form data as message body.
Creates new message with supplied form data as message body.
After adding body to message, the Content-Type header is set to
application/x-www-form-urlencoded
, and Content-Length is set to length
of encoded form data.
- Value Params
- more
additional form data
- one
form data
Creates new message with supplied query string as message body.
Creates new message with supplied query string as message body.
After adding body to message, the Content-Type header is set to
application/x-www-form-urlencoded
, and Content-Length is set to length
of encoded query string.
- Value Params
- query
message body
Creates new message with supplied multipart as message body.
Creates new message with supplied multipart as message body.
After adding body to message, the Content-Type header is set to
multipart/form-data
with a boundary parameter whose value is used
to delimit parts in encoded message body.
- Value Params
- multipart
message body
Creates new message with supplied parts as message body, with the parts encoded as multipart form data.
Creates new message with supplied parts as message body, with the parts encoded as multipart form data.
After adding body to message, the Content-Type header is set to
multipart/form-data
with a boundary parameter whose value is used
to delimit parts in encoded message body.
- Value Params
- parts
message body
Creates new message with supplied parts as message body, with the parts encoded as multipart form data.
Creates new message with supplied parts as message body, with the parts encoded as multipart form data.
After adding body to message, the Content-Type header is set to
multipart/form-data
with a boundary parameter whose value is used
to delimit parts in encoded message body.
- Value Params
- more
additional parts
- one
part
Creates new message with supplied text as message body.
Creates new message with supplied text as message body.
After adding body to message, the Content-Type header is set to
text/plain
with its charset parameter set accordingly, and
Content-Length is set to length of encoded characters.
- Value Params
- charset
character set
- text
message body