mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +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> {
|
||||
console.log(JSON.stringify(data));
|
||||
let headers = new HttpHeaders({
|
||||
const headers = new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
'X-Requested-Method': 'POST',
|
||||
});
|
||||
let options = { headers: headers };
|
||||
const options = { headers: headers };
|
||||
const url = 'http://localhost:8011/api/promotions/add';
|
||||
return this.http.post(url, JSON.stringify(data), options).pipe(
|
||||
catchError(this.handleError),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue