This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Regular expression patterns for testing content-type response headers. | |
var RE_CONTENT_TYPE_JSON = new RegExp( "^application/(x-)?json", "i" ); | |
var RE_CONTENT_TYPE_TEXT = new RegExp( "^text/", "i" ); | |
// Static strings. | |
var UNEXPECTED_ERROR_MESSAGE = "An unexpected error occurred while processing your request."; | |
export class ApiClient { | |
/** | |
* I initialize the API client. |