body property
Gets this request's body as a JSON Map
or List
.
By default, the body of this FormRequest will is an empty Map
.
The returned Map
is modifiable, allowing incremental field assignment
like so:
FormRequest request = new FormRequest()
..body['foo'] = 'bar'
..body['bar'] = 'baz';
Prior to sending, this request body will be translated to the equivalent query string. Depending on the platform, this may then be encoded to bytes. Be sure to set encoding if this request body should be encoded with something other than the default utf-8.
Implementation
dynamic get body;
Sets this request's form body. The given Map
should represent the form
fields where each key-value pair is a field's name and value.
Prior to sending, this request body will be translated to the equivalent query string. Depending on the platform, this may then be encoded to bytes. Be sure to set encoding if this request body should be encoded with something other than the default utf-8.
Implementation
set body(dynamic body);