getVNClassAvailable(studentCode:string, year: string, semester: string) {
   return this.http.get(this.connectionLink.getConnection()+'/getVNclassAvailableREST/'+studentCode+'&'+year+'&'+semester,this.options)
   .toPromise()
   .then(res =>res.json())
   .then(resJson => resJson);
 }
Example #2
0
 getFeaturedPromotion(): Observable<Promotion> { 
     return this.http.get(baseURL + 'promotions?featured=true') 
     .map(res => { return this.processHTTPMsgService.extractData (res)[0]; }) 
     .catch(error => { return this.processHTTPMsgService .handleError(error); }); 
 }
Example #3
0
	getItems() {
		return this.http.get('http://localhost/service/126').map(res => res.json());
	}
 getPendingTransactions(): Observable<PendingTxn[]> {
   return this._http
   .get('/pendingTxs', {headers: this.getHeaders()})
   .map((res:Response) => res.json())
   .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
 }
 private getData(data_url): Promise<any> {
   return this.http.get(data_url)
     .toPromise()
     .then(this.extractData)
     .catch(this.handleError);
 }
 getProductByID(productID: string): Observable<any>{
     return this.http.get(`/products/${productID}`)
         .map(res => res.json());
  }
 public getPermission(): Promise<IUserPermissions> {
     return this.http.get('Manager/Api/UserPermissions')
         .toPromise()
         .then((response) => response.json() as IUserPermissions)
         .catch(this.handleError);
 }
Example #8
0
 //Get the user list
 getUsers(): Promise<User[]> {
     return this.http.get(userMgmtEndpoint, HTTP_GET_OPTIONS).toPromise()
         .then(response => response.json() as User[])
         .catch(error => this.handleError(error));
 }
const bazList = (http: Http) =>
    http.get('/data/bazData.json').map(res => res.json()).toPromise();
 public get(url:string):Observable<any> {
     let headers = new Headers({ 'Accept': 'application/json' });
     let options = new RequestOptions({ headers: headers });
     return this.http.get(`${this.baseUrl}${url}`, options);
 }