My Web application is with Grails 4 and my url is like http://myweb...
i would like to call my rest api using https but not using http. like https://myweb/api1
but not like http://myweb/api1.
I don't want to change my entire application to https but only the api has to be changed.
how can I do that?
Related
Basically I have a web API written .NET Core. Having a GET API exposed, from that API I need to redirect to another URL with a custom header. I have tried the redirect method, however it is not forwarding the custom headers.
Let's imagine I have a test.com serving a SPA domain with a route /home and a back-end that serves this SPA which also has a route called /home. Who answers first if I put test.com/home on my address bar?
The answer is that the server responds first.
What you have to understand about routing in SPA's is that the routing is "faked". As in changing from one route to another doesn't cause the browser to make any HTTP requests like in a typical server-side application.
When you put test.com/home into your address bar for the first time the browser will make an HTTP GET request which makes its way into your server-side application returning the index.html file containing everything needed to bootstrap your SPA in the browser.
Once your SPA is running it's essentially hijacking your browsers' default behaviour which would be to send a GET request when you visit test.com/home. So if your app ever redirects the user back to test.com/home the browser would not send another GET request to your server, but instead the SPA would handle the routing and render the corresponding view.
how can I log all HTTP headers from php web application, including ajax requests etc? Is there some easy to use middleman application which can save all requests from specific HTTP host to specific file?
I need it for web application behavior analysis
Postman might be what you looking for. It's a Chrome plugin that you can log everything including the headers.
https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en
I have a server side (which i did not create) RESTful API that uses ASP.Net
I want to place that API inside the same server as my site so that when I call that API, all i have to do is call the Resource.
For example:
instead of,
$http("http://localhost/API/post");
i would like it to be,
$http(".../API/post");
Thank You
I have a https site say with url www.example.com. On this server, I've an application which is decoupled in front-end and back-end. The front-end is a gwt application and the back-end is a REST interface.
To call the rest interface, the front-end uses https, say with a url like https://www.example.com/api
however, when I'm trying to call the front-end using http://www.example.com, it is not making the call to rest interface when i'm using https://www.example.com, it is ok. Can someone explain the reason of this problem??
https://www.example.com and http://www.example.com are different URIs and nothing requires that a web server serve up the same content for both. Presumably your server isn't configured to do so.