Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48983

HTTP POST Request key

$
0
0

Hi all,

The question is not really related to the Ionic Framework, however…

I have one might be very simple question. I have to do a POST Request to check voucher validity. The post request uses URL Params only (without value with key only) and I am confused how to manage it from the app?
If someone of you have any idea or solution it will be highly appreciated!!!
Here is what I am trying to achieve:

This is the API endpoint which I have to call ( passing application_module and voucher values)

https://xyz/api/check_voucher/application_module/voucher

What I have tried so far:

 let urlSearchParams = new URLSearchParams ();
 urlSearchParams.append('', 'myapplicationmodule/');
 urlSearchParams.append('', "myvouchercode");

return this.httpClient.post(environment.url, urlSearchParams );

Second attempt:

 let application_module = 'xyz/';
 let voucher = 'xyz'
 return this.httpClient.post(environment.url, application_module + voucher );

None of above mentioned methods have success. :confused:

I am so confused how to achieve this POST call without key… Is there any way to do that?

Thanks in advance guys!!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>