fix(http): GET Body fix

This commit is contained in:
Max Lynch
2015-07-01 18:04:02 -05:00
parent 7f2ae39f88
commit b9ca4e1340

View File

@ -44,9 +44,12 @@ export class Http {
headers: {
'Accept': 'application/json,text/plain,*/*',
},
body: (typeof data === 'string') ? data : JSON.stringify(data)
});
if(options.body) {
options.body = (typeof data === 'string') ? data : JSON.stringify(data)
}
if(sendsJson) {
options.headers['Content-Type'] = 'application/json';
}