HttpClientRequesterSimulation class
A Simulated HttpClientRequester. Useful for tests and mocks.
- Inheritance
- 
    - Object
- HttpClientRequester
- HttpClientRequesterSimulation
 
Constructors
Properties
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
Methods
- 
  buildPOSTFormData(Map< String, String?> data, [Map<String, String> ? requestHeaders]) → String
- 
  
  inherited
- 
  buildQueryString(Map< String, String?> ? data) → String
- 
  Helper to build a Query String.
  inherited
- 
  buildRequestBody(HttpClient client, HttpRequestBody httpBody, Authorization? authorization) → HttpRequestBody 
- 
  Helper to build the request body.
  inherited
- 
  buildRequestHeaders(HttpClient client, HttpMethod method, String url, {Map< String, String> ? headers, Authorization? authorization, String? contentType, String? accept}) → Map<String, String> 
- 
  Helper to build the request headers.
  inherited
- 
  buildRequestURL(HttpClient client, String url, {Authorization? authorization, Map< String, String?> ? queryParameters, bool noQueryString = false}) → String
- 
  Helper to build the request URL.
  inherited
- 
  close() → void 
- 
  Closes the HttpClientRequester and internal instances.
  inherited
- 
  doHttpRequest(HttpClient client, HttpRequest request, ProgressListener? progressListener, bool log) → Future< HttpResponse> 
- 
  Implementation for simulated requests.
  override
- 
  getSimulationPatternsByMethod(HttpMethod method) → Map< RegExp, SimulateResponse> 
- 
  /////////
Returns for parameter methoda Map with RegExp patterns as key and SimulateResponse as value.
- 
  log(Object? o) → void 
- 
  
  inherited
- 
  logError(Object? message, [Object? error, StackTrace? stackTrace]) → void 
- 
  
  inherited
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  replyANY(RegExp urlPattern, String response) → void 
- 
  Defines a reply responsefor any Method requests withurlPattern.
- 
  replyGET(RegExp urlPattern, String response) → void 
- 
  Defines a reply responsefor GET requests withurlPattern.
- 
  replyOPTIONS(RegExp urlPattern, String response) → void 
- 
  Defines a reply responsefor OPTIONS requests withurlPattern.
- 
  replyPOST(RegExp urlPattern, String response) → void 
- 
  Defines a reply responsefor POST requests withurlPattern.
- 
  replyPUT(RegExp urlPattern, String response) → void 
- 
  Defines a reply responsefor PUT requests withurlPattern.
- 
  request(HttpClient client, HttpMethod method, String url, {Map< String, String> ? headers, Authorization? authorization, Map<String, String?> ? queryParameters, bool noQueryString = false, Object? body, String? contentType, String? accept, String? responseType, ProgressListener? progressListener}) → Future<HttpResponse> 
- 
  
  inherited
- 
  requestDELETE(HttpClient client, String url, {Map< String, String> ? headers, Authorization? authorization, Map<String, String?> ? queryParameters, bool noQueryString = false, Object? body, String? contentType, String? accept, String? responseType, ProgressListener? progressListener}) → Future<HttpResponse> 
- 
  
  inherited
- 
  requestGET(HttpClient client, String url, {Map< String, String> ? headers, Authorization? authorization, Map<String, String?> ? queryParameters, bool noQueryString = false, String? accept, String? responseType, ProgressListener? progressListener}) → Future<HttpResponse> 
- 
  
  inherited
- 
  requestHEAD(HttpClient client, String url, {Map< String, String> ? headers, Authorization? authorization, Map<String, String?> ? queryParameters, bool noQueryString = false, ProgressListener? progressListener}) → Future<HttpResponse> 
- 
  
  inherited
- 
  requestOPTIONS(HttpClient client, String url, {Map< String, String> ? headers, Authorization? authorization, Map<String, String?> ? queryParameters, bool noQueryString = false, ProgressListener? progressListener}) → Future<HttpResponse> 
- 
  
  inherited
- 
  requestPATCH(HttpClient client, String url, {Map< String, String> ? headers, Authorization? authorization, Map<String, String?> ? queryParameters, bool noQueryString = false, Object? body, String? contentType, String? accept, String? responseType, ProgressListener? progressListener}) → Future<HttpResponse> 
- 
  
  inherited
- 
  requestPOST(HttpClient client, String url, {Map< String, String> ? headers, Authorization? authorization, Map<String, String?> ? queryParameters, bool noQueryString = false, Object? body, String? contentType, String? accept, String? responseType, ProgressListener? progressListener}) → Future<HttpResponse> 
- 
  
  inherited
- 
  requestPUT(HttpClient client, String url, {Map< String, String> ? headers, Authorization? authorization, Map<String, String?> ? queryParameters, bool noQueryString = false, Object? body, String? contentType, String? accept, String? responseType, ProgressListener? progressListener}) → Future<HttpResponse> 
- 
  
  inherited
- 
  setupUserAgent(String? userAgent) → bool 
- 
  
  override
- 
  simulateANY(RegExp urlPattern, SimulateResponse response) → void 
- 
  Defines simulated responseforurlPatternfor any Method.
- 
  simulateGET(RegExp urlPattern, SimulateResponse response) → void 
- 
  Defines GET simulated responseforurlPattern.
- 
  simulateOPTIONS(RegExp urlPattern, SimulateResponse response) → void 
- 
  Defines OPTIONS simulated responseforurlPattern.
- 
  simulatePOST(RegExp urlPattern, SimulateResponse response) → void 
- 
  Defines POST simulated responseforurlPattern.
- 
  simulatePUT(RegExp urlPattern, SimulateResponse response) → void 
- 
  Defines PUT simulated responseforurlPattern.
- 
  stderr(Object? o) → void 
- 
  
  inherited
- 
  stdout(Object? o) → void 
- 
  
  inherited
- 
  submitHttpRequest(HttpClient client, HttpRequest request, ProgressListener? progressListener, bool log) → Future< HttpResponse> 
- 
  
  inherited
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited