mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 14:01:20 +08:00
fix(http): GET Body fix
This commit is contained in:
@ -44,9 +44,12 @@ export class Http {
|
|||||||
headers: {
|
headers: {
|
||||||
'Accept': 'application/json,text/plain,*/*',
|
'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) {
|
if(sendsJson) {
|
||||||
options.headers['Content-Type'] = 'application/json';
|
options.headers['Content-Type'] = 'application/json';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user