mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 16:30:13 +01:00
add post method v1
This commit is contained in:
parent
02368778a4
commit
068f8dda2f
1 changed files with 2 additions and 3 deletions
|
|
@ -21,12 +21,11 @@ export class PromotionService {
|
||||||
}
|
}
|
||||||
|
|
||||||
postPromotion(data: PromotionList): Observable<any> {
|
postPromotion(data: PromotionList): Observable<any> {
|
||||||
console.log(JSON.stringify(data));
|
const headers = new HttpHeaders({
|
||||||
let headers = new HttpHeaders({
|
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'X-Requested-Method': 'POST',
|
'X-Requested-Method': 'POST',
|
||||||
});
|
});
|
||||||
let options = { headers: headers };
|
const options = { headers: headers };
|
||||||
const url = 'http://localhost:8011/api/promotions/add';
|
const url = 'http://localhost:8011/api/promotions/add';
|
||||||
return this.http.post(url, JSON.stringify(data), options).pipe(
|
return this.http.post(url, JSON.stringify(data), options).pipe(
|
||||||
catchError(this.handleError),
|
catchError(this.handleError),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue