ChopperApi class

Define a Chopper API

Must be use on an abstract class that extend the ChopperService class. To simplify instantiation, it's recommanded to define a statis create method.

@ChopperApi(baseUrl: '/todos')
abstract class TodosListService extends ChopperService {
  static TodosListService create([ChopperClient client]) =>
      _$TodosListService(client);
}

See Method to define an HTTP request

Annotations
  • @immutable

Constructors

ChopperApi({String baseUrl: ''})
const

Properties

baseUrl → String
Url that will prefix every request define inside that API.
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

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

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited