Options
All
  • Public
  • Public/Protected
  • All
Menu

Agent

The sole requirement of this class is to implement a JSON request method that supports HTTP attributes defined in HttpRequest

The underlying implementation (i.e. whether it uses node's http module, or browser XHR) is the responsibility of downstream client implementations. Namely @ideal-postcodes/core-browser and @ideal-postcodes/core-node

example
class AxiosAgent implements Agent {
  public http(options) {
    return axios.request(options);
  }
}

Hierarchy

  • Agent

Index

Properties

Properties

http

http: Http