Skip to content

Instantly share code, notes, and snippets.

@chanakaDe
Created July 22, 2016 14:29
Show Gist options
  • Save chanakaDe/81e89428086a24e5b73f805a04ba4d80 to your computer and use it in GitHub Desktop.
Save chanakaDe/81e89428086a24e5b73f805a04ba4d80 to your computer and use it in GitHub Desktop.
export class HttpClient {
isRequesting: boolean;
constructor();
configure(fn: ((builder: RequestBuilder) => void)): HttpClient;
createRequest(url: string): RequestBuilder;
send(requestMessage: RequestMessage, transformers: Array<RequestTransformer>): Promise<HttpResponseMessage>;
delete(url: string): Promise<HttpResponseMessage>;
get(url: string): Promise<HttpResponseMessage>;
head(url: string): Promise<HttpResponseMessage>;
jsonp(url: string, callbackParameterName?: string): Promise<HttpResponseMessage>;
options(url: string): Promise<HttpResponseMessage>;
put(url: string, content: any): Promise<HttpResponseMessage>;
patch(url: string, content: any): Promise<HttpResponseMessage>;
post(url: string, content: any): Promise<HttpResponseMessage>;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment