ionic-team / ionic-team/cordova-plugin-ionic-webview

Http reuest for api calling in ionic1 app is not working

Open
#60 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
493
Forks
410
PR merge metrics
No merged PRs in 30d

Description

Hello Guys,

I am added this plugin in my updated ionic1 iOS app as I am facing some UI issue in iOS 11. But after adding this plugin my api calling by http request is not working throughout the app and it is always coming in err scenario. Before adding this plugin my api are working fine witht the header.

So can you please help me what to pass in header if it is the issue of headers in api. Please check my below api request.

var req8 = {
method: 'POST',
url: "api url",
params: {
"device_type": "iOS",
"device_token": token

},
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}

$http(req8).then(function(res) {
}, function myError(err) {
$ionicLoading.hide();
var alertPopup = $ionicPopup.alert({
template: 'Connection Error. Please reload.'
});
}
)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Ionic 1 iOS request at the `$http(req8)` call after installing the plugin, then inspect the error callback and request headers. Done means identifying whether the plugin causes the POST to fail and documenting the required request configuration or a confirmed incompatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript
Domain
api, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.