field top-level constant

Field const field

Defines a field for a x-www-form-urlencoded request. Automatically binds to the name of the method parameter.

@Post(path: '/')
Future<Response> create(@Field() String name);

Will be converted to { 'name': value }.

Implementation

const field = Field();