-
-
Save refaelgold/50af3578850ea713304a242a7554a2a6 to your computer and use it in GitHub Desktop.
rest api for ng2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Nir Goldman on 12/06/2016. | |
*/ | |
import {Injectable} from 'angular2/core'; | |
import {Http,Headers} from 'angular2/http'; | |
@Injectable() | |
export class Magento2 { | |
constructor(private _http: Http) { | |
} | |
getAllM2Products(){ | |
var headers=new Headers(); | |
headers.append('Content-Type','application/x-www-form-urlencoded'); | |
return this._http.get('http://www.mageplayground.tk/rest/V1/categories',{ | |
headers:headers | |
}) | |
.map(res=>res.json()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment