getSearchResults(searchTerm) { return this.http.post(this.apiURL + 'searchResultsPage.json', {searchTerm}); }
public add<T>(itemName: string): Observable<T> { const toAdd = JSON.stringify({ ItemName: itemName }); return this.http.post<T>(this.actionUrl, toAdd); }
create(personId: number, command: ChargeCommand): Observable<ChargeModel> { return this.http.post<ChargeModel>(`/api/persons/${personId}/charges`, command); }
signup(credentials: User): Observable<object> { return this.http.post('http://localhost:8080/api/users', credentials).pipe( mergeMap(res => this.login(credentials)) ); }
addTask(name:string,desc:string){ httpOptions.headers = httpOptions.headers.set('Authorization', window.localStorage['jwt']); return this.http.post(url+"task",JSON.stringify({name:name,description:desc}),httpOptions); }
addHistory(atletaHistory: AtletaHistory) { atletaHistory.codigo = null; return this.http.post(`${LUF_API}/atletas/history-new`, atletaHistory); }
create(personId: number, text: string): Observable<NoteModel> { const command = { text }; return this.http.post<NoteModel>(`/api/persons/${personId}/notes`, command); }
/** * Duplicates and saves an existing playbook, it's workflows, actions, branches, etc. under a new name. * @param playbookId ID of the playbook to duplicate * @param newName Name of the new copy to be saved */ duplicatePlaybook(playbookId: string, newName: string): Promise<Playbook> { return this.http.post(`/api/playbooks?source=${playbookId}`, { name: newName }) .toPromise() .then((data) => plainToClass(Playbook, data)) .catch(this.utils.handleResponseError); }
public escalate(alerts: Alert[]): Observable<Object | RestError> { return this.http.post('/api/v1/alerts/ui/escalate', alerts).pipe( catchError(HttpUtil.handleError)); }
public save(recipe: Recipe) { if (!recipe.id) { return this.http.post('/recipes', recipe); } }