Httpclient post not working in angular device but its working in browser

finally i fixed the problem by installing CORS from below link

and add the below tag in web.config file within the <system.webserver> tab

       <cors enabled="true" failUnlistedOrigins="true">
	     <add origin="*" maxAge="600"> 
		 <!-- allowCredentials="true" -->
		<allowHeaders allowAllRequestedHeaders="true">
			<add header="header1" />
			<add header="header2" />
			 <add method="POST" />
			 <add method="OPTIONS" />
			<add header="header1" />
			<add header="header2" />
1 Like

Please provide documentation link of Solution.

I have the same issue then I resolve it by downgrade Ionic-4 CLI version and I have created a git repository for this.

You can use it

1 Like

I will try for the next project :smiley:

ya i am facing the same issue

this works well!! after implementing it, then it works out well

Hi @kasimacsys,
Can you tell the exact place where we have to add the above code ? this would be really helpful.
From where can we find the web.config file in our project?