Ionic 5 native-http plugin is not identifying my headers, thus response is always 404 Page not found error

I am using a native HTTP plugin for my API’s in Ionic 5. (As suggested in

However, after debugging the request I came into a conclusion that my headers are not considered and that is resulting a Page not found error. Can anyone help me out to resolve this issue?

Here is my code snippet:

async signIn(){
    this.loader = this.presentLoadingWithOptions();

    let nativeCall = this.loginProvider.authenticateUser(this.username, this.password);

    from(nativeCall).subscribe(resp =>{

         if(this.userType === "retailer"){           
         else if(this.userType === "influencer"){

Here is my provider:

async authenticateUser(username:BigInteger, password:BigInteger) {
    try {
        const url = this.config.baseURL + `login?user=${username}&password=${password}`;
        const headers = this.config.httpOptions;

        const response = await, {}, {headers:headers});
        console.log(JSON.parse(; // JSON data returned by server
        return response;

    } catch (error) {

Here is my config.ts: Headers key value has been changed for this query.

    httpOptions: any = JSON.stringify({

This API works fine in postman however, If I remove the headers the API returns a 404 error which is obvious. The same response is what I am receiving even though I am passing my headers in this http call.

Any suggestion will help me a lot.