Post class final

Defines a method as an HTTP POST request.

Use the Body annotation to pass data to send.

Inheritance
Annotations
  • @immutable
  • @Target({TargetKind.method})

Constructors

Post({bool optionalBody = false, String path = '', Map<String, String> headers = const {}, ListFormat? listFormat, bool? useBrackets, bool? includeNullQueryVars})
Defines a method as an HTTP POST request.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Headers Map that should be apply to the request
finalinherited
includeNullQueryVars bool?
Set to true to include query variables with null values. This includes nested maps. The default is to exclude them.
finalinherited
listFormat ListFormat?
List format to use when encoding lists
finalinherited
method String
HTTP method for the request
finalinherited
optionalBody bool
Mark the body as optional to suppress warnings during code generation
finalinherited
path String
Path to the request that will be concatenated with the ChopperApi.baseUrl.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useBrackets bool?
Use brackets [ ] to when encoding
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited