AI
Size: a a a
AI
AI
AI
AS
AS
ionic generate provider MyProvider
AI
AS
AS
AS
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
params?: HttpParams | {
[param: string]: string | string[];
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<HttpResponse<string>>;
AS
AS
observe: 'response'
AS
AS
AS
this.http.get<Post>(this.url, { observe: 'response' }).subscribe(res => {
this.powered = res.headers.get('X-Powered-By');
this.postTitle = res.body.title;
});
AI