(url: string, data: any, headers?: any, expectedCodes = [200], timeout = Http.defaultTimeout)
| 19 | } |
| 20 | |
| 21 | public static post(url: string, data: any, headers?: any, expectedCodes = [200], timeout = Http.defaultTimeout): Promise<XMLHttpRequest> { |
| 22 | if (ObjectUtils.isNullOrUndefined(data)) { |
| 23 | throw new Error("data must be a non-undefined object, but was: " + data); |
| 24 | } |
| 25 | return Http.createAndSendRequest("POST", url, headers, expectedCodes, timeout, data); |
| 26 | } |
| 27 | |
| 28 | protected static createAndSendRequest(method: string, url: string, headers?: any, expectedCodes = [200], timeout = Http.defaultTimeout, data?: any): Promise<XMLHttpRequest> { |
| 29 | if (!url) { |
no test coverage detected