getSearchResults(searchTerm) {
   return this.http.post(this.apiURL + 'searchResultsPage.json', {searchTerm});
 }
Esempio n. 2
0
  public add<T>(itemName: string): Observable<T> {
    const toAdd = JSON.stringify({ ItemName: itemName });

    return this.http.post<T>(this.actionUrl, toAdd);
  }
Esempio n. 3
0
 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))
   );
 }
Esempio n. 5
0
 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);
 }
Esempio n. 7
0
 create(personId: number, text: string): Observable<NoteModel> {
   const command = { text };
   return this.http.post<NoteModel>(`/api/persons/${personId}/notes`, command);
 }
Esempio n. 8
0
	/**
	 * 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));
 }
Esempio n. 10
0
 public save(recipe: Recipe) {
   if (!recipe.id) {
     return this.http.post('/recipes', recipe);
   }
 }