Add headers and options in post request for community-edit-form

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51344 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-03-20 12:09:51 +00:00
parent 202c7253e6
commit cf7e67c967
1 changed files with 7 additions and 2 deletions

View File

@ -16,10 +16,15 @@ export class CommunityService {
}
updateCommunity(url: string, community:any) {
let headers = new Headers({'Content-Type': 'application/json'});
let options = new RequestOptions({headers: headers});
let body = JSON.stringify(community);
return this.http.post(url, body)
.map(res => res.json())
console.log(body);
return this.http.post(url, body, options)
/*.map(res => res.json())*/
.do(request => console.log("Insert Response:"+request.status));
}