Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cors = new EnableCorsAttribute(origins:"*",methods: "*", headers: "*");
- config.EnableCors(cors);
- [Route("SaveorUpdateCategory")]
- [HttpPost]
- public IHttpActionResult SaveorUpdateCategory(ModelCategory model)
- {
- string res = objcate.SaveorUpdateCategory(model);
- return Ok(res);
- }
- SaveorUpdateCategory( model: any): Observable<any> {
- this.headers= new Headers({ 'Content-Type': 'application/json' })
- this.options = new RequestOptions({ headers: this.headers });
- let body = JSON.stringify(model);
- return this._http.post(this.BaseURL+"Category/SaveorUpdateCategory", model, this.options)
- .map((response: Response) => <any>response.json())
- .catch(this.handleError);
Add Comment
Please, Sign In to add comment