Questions tagged [ionic-native-http]

16 questions
9
votes
3 answers

How to stop caching my HTTP request & response in ionic 3

I want to stop caching my API request and response which the native-http plugin stored its cache and its creating issue with my app. All-time API works fine but when I get a 404 or 401 error from the server it will cache it in my app and then after…
2
votes
0 answers

How to upload a binary file using native http in ionic

Hi i want to send file using native http as binary not form data can you please guide me thorugh it how to do. I am using ionic 6 Need to upload file using native http send as binary Cant able to find proper solution. can any one guide me other…
sai kiran
  • 389
  • 2
  • 10
2
votes
0 answers

Error: "headers" option needs to be an dictionary style

I am trying to get a blob image from the backend and I am using native HTTP in the ionic 4 app. Implementation as shown below: import { HTTP } from '@ionic-native/http/ngx'; constructor(private nativeHttp: HTTP) {} getAttachmentWithNativeHttp(url:…
2
votes
1 answer

Ionic 4: How do I trust Self-Signed Cert using ionic-native/http/ngx?

I am trying to use HTTP ionic-native/http/ngx in place of HTTPClient angular/common/http. I tried to follow examples from…
Belvia
  • 129
  • 1
  • 2
  • 13
1
vote
0 answers

ionic-native/file + ionic-native/http download not working

Using code from this answer https://stackoverflow.com/a/63585081/7751910 and can't get it to work. Don't have physical ios device, so using Xcode simulator. This is my code with console.log()'s: public downloadFileAndStore(fileUrl: string): void…
1
vote
1 answer

ionic native http post call is not supporting responseType as blob for pdf download from as WebService

I am using ionic5 with Angular. My API returns pdf as Blob object. I am able to get Blob response when using Angular Http(which works on browser) let headers = new HttpHeaders({ 'Accept': 'application/pdf', 'Content-type':…
amarnathpatel
  • 981
  • 10
  • 20
1
vote
1 answer

Typescript error while implementing ionic's native HTTP interceptor

I was modifying already working Angular 10 web-app into ionic native app, when I got some CORS issues. As I couldn't change anything on BE, I came across native-HTTP plugin Ionic has. I followed Angular's instructions on how to make an interceptor…
1
vote
0 answers

Querying graphql from Ionic via Native Http

I'm migrating some services from Rest to Graphql in an Ionic App. I use the Ionic/Cordova native http plugin in order to make requests to my server, in the following way: import {HTTP} from '@ionic-native/http/ngx' @Injectable() export class…
1
vote
0 answers

How to maintain sequence of the values in a JSON object?

I am working on an ionic app which will be used on Android and iOS platforms. I am using one endpoint to post user data to the backend. { "name": "abcd", "emailAddress": "abcd@def.com", "mobile": "1234567890" } when I send this JSON Object…
Ragesh Pikalmunde
  • 1,333
  • 1
  • 20
  • 44
0
votes
0 answers

How to overcome cors in ionic angular to load json assets from another domain

in our ios application using ionic angular v6 we loads assets files from a seperate server for image file we are not experiencing any corse issue, but for json files ( for lottie animations ) when i provide link i experience cors errors …
sinan
  • 133
  • 8
0
votes
1 answer

Ionic 6 . When I add firebasex plugin. Ionic-native/http stops working

I was using FCM plugin earlier. But it stopped working on Android 11. So thought of switching to firebasex plugin. But as soon as I add it to my project. ionic-native/http stops working. Ionic Info : Ionic: Ionic CLI :…
0
votes
1 answer

Ionic Native HTTP returning -1 status error on Ios Simulator

Ionic Native HTTP returns {status: -1} for a single API call in IOS Simulator I'm using Ionic Native HTTP to get around CORS issues in IOS and there's a single Wordpress API call /wp-json/wp/v2/ that is always returning -1, despite the fact that…
NeedHelp101
  • 599
  • 1
  • 9
  • 25
0
votes
2 answers

Ionic native Http post not working in IOS

I need help in resolving this issue. I’m facing issue when doing POST request to get the access token in IOS. Whereas it works fine in Android. I'm using the Cordova plugin cordova-plugin-advanced-http: "^2.4.1". Code: const bodyParams =…
0
votes
1 answer

Ionic 4: Setting native http post headers properly

I'm struggling to find the solution to my problem with ionic native http. I tried the answer to this post, but still i am getting the same error this is my code switchToggle(){ let url =…
Kim Carlo
  • 1,173
  • 3
  • 19
  • 47
0
votes
1 answer

After adding "cordova-plugin-advanced-http", "ionic cordova run android" starts giving error

ionic cordova run/build android works fine until I added the plugin cordova-plugin-advanced-http, the error stated as follows: An unhandled exception occurred: D:\Projects\MyApp\myAppTest\www\plugins\cordova-plugin-advanced-http\www\helpers.js:…
1
2