Method class 
 
    
    
    
  
    Constructors
    
        - 
          Method({String method = 'GET', dynamic uri, List<ClientCookie> cookies = const [], List<Before> before = const [], List<After> after = const [], Map<String, dynamic> metadata = const {}, BaseClient? client})
        
- 
          
        
 
    
  
    
  
    Methods
    
        - 
  after(After interceptor)
    → Method
  
  
- 
  
  
- 
  
  
- 
  authToken(String credentials)
    → Method
  
  
- 
  
  
- 
  basicAuth(String username, String password)
    → Method
  
  
- 
  
  
- 
  before(Before interceptor)
    → Method
  
  
- 
  
  
- 
  charset(String charset)
    → Method
  
  
- 
  
  
- 
  clone()
    → Method
  
  
- 
  
  
- 
  contentType(String mimeType, String charset)
    → Method
  
  
- 
  
  
- 
  cookie(ClientCookie cookie)
    → Method
  
  
- 
  
  
- 
  cookies(List<ClientCookie> cookie)
    → Method
  
  
- 
  
  
- 
  exact({int? statusCode, String? body, List<int>? bytes, String? mimeType, String? encoding, int? contentLength, Map<String, dynamic> pathParams = const {}})
    → Future<Response>
  
  
- 
  
  
- 
  expect(List<Checker<Response>> conditions, {Map<String, dynamic> pathParams = const {}})
    → Future<Response>
  
  
- 
  
  
- 
  go({ResponseHook? onSuccess, ResponseHook? onFailure, bool throwOnErr = false, Map<String, dynamic> pathParams = const {}})
    → Future<Response>
  
  
- 
  
  
- 
  Add headers
  
- 
  Add headers
  
- 
  
  
- 
  http(String origin, [String? path])
    → Method
  
  
- 
  
  
- 
  https(String origin, [String? path])
    → Method
  
  
- 
  
  
- 
  metadata(Map<String, dynamic> value)
    → Method
  
  
- 
  
  
- 
  mimeType(String mimeType)
    → Method
  
  
- 
  
  
- 
  noSuchMethod(Invocation invocation)
    → dynamic
  
  
- 
  Invoked when a nonexistent method or property is accessed.
  inherited 
- 
  origin(String origin, [String? path])
    → Method
  
  
- 
  Set origin of the URL
  
- 
  path(String path)
    → Method
  
  
- 
  Append path segments to the URL
  
- 
  pathParam(String name, dynamic value)
    → Method
  
  
- 
  
  
- 
  pathParams(Map<String, dynamic> pathParams)
    → Method
  
  
- 
  
  
- 
  queries(Map<String, dynamic> value)
    → Method
  
  
- 
  Add query parameters
  
- 
  query(String key, dynamic value)
    → Method
  
  
- 
  Add query parameters
  
- 
  readBytes({Map<String, dynamic> pathParams = const {}, FutureOr onError(Response resp)?})
    → Future<List<int>?>
  
  
- 
  
  
- 
  readList<T>({T convert(Map d)?, Map<String, dynamic> pathParams = const {}, FutureOr onError(Response resp)?})
    → Future<List<T>?>
  
  
- 
  Fetches json response and returns the decoded result
  
- 
  readOne<T>({T convert(Map d)?, Map<String, dynamic> pathParams = const {}, FutureOr onError(Response resp)?})
    → Future<T?>
  
  
- 
  Fetches json response and returns the decoded result
  
- 
  readString({Map<String, dynamic> pathParams = const {}, FutureOr onError(Response resp)?})
    → Future<String?>
  
  
- 
  
  
- 
  toString()
    → String
  
  
- 
  A string representation of this object.
  inherited 
- 
  url(String value)
    → Method
  
  
- 
  
  
- 
  withClient(BaseClient client)
    → Method
  
  
- 
  Set the clientused to make HTTP requests