diff options
-rw-r--r-- | recipeBuddy/src/app/REST_service/backend.service.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/recipeBuddy/src/app/REST_service/backend.service.ts b/recipeBuddy/src/app/REST_service/backend.service.ts index 9903ad0..e6456ce 100644 --- a/recipeBuddy/src/app/REST_service/backend.service.ts +++ b/recipeBuddy/src/app/REST_service/backend.service.ts @@ -58,6 +58,12 @@ export class BackendService { ) } + createRecipe(data): Observable<Recipe> + { + return this.http.post<Recipe>(this.apiURL + '/recipes', + JSON.stringify(data), this.httpOptions) + } + handleError(error) { let errMsg = ''; if (error.error instanceof ErrorEvent) { |