initialize static method

void initialize(
  1. String url,
  2. String appID,
  3. {Map<String, String> headers}
)

sets the url, appID and additional headers for api calls

Implementation

static void initialize(String url, String appID,
    {Map<String, String> headers}) {
  _url = url;
  _appId = appID;
  _headers = {
    'X-Parse-Application-Id': _appId,
    'Content-Type': 'application/json',
  };
  for (var key in headers.keys) {
    _headers.putIfAbsent(key, () => headers[key]);
  }
}