mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
fix(http): GET Body fix
This commit is contained in:
@ -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';
|
||||
}
|
||||
|
Reference in New Issue
Block a user