Ktor Client JS: request to /example requests http://localhost/example
See original GitHub issueKtor Version and Engine Used (client or server and name) Ktor Client Common 1.3.1, in browser (JS)
Describe the bug request to /example requests http://localhost/example
To Reproduce Steps to reproduce the behavior:
- Clone https://github.com/Ribesg/Kita/tree/2c7941183ebcde1fc2193bd00a1bed53f1249b10 on a machine which can be reached from the network (a server)
git clone https://github.com/Ribesg/Kita cd Kita git reset --hard 2c7941183ebcde1fc2193bd00a1bed53f1249b10
- Run
./runServer.sh
- Browse to
https://yourserver:12345
- Try to login using whatever credentials (correct ones are admin/admin)
- See failing requests to
https://localhost/api/auth/login
instead ofhttps://yourserver:12345/api/auth/login
in the console
Expected behavior
Requests should use the current location.origin
when none is provided in the browser
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Making requests | Ktor
Code example: client-configure-request ... The main way of making HTTP requests is the request function that can take a URL as a parameter....
Read more >Creating a client application - Ktor
In this tutorial, we'll create a simple client application for sending a request and receiving a response. Prerequisites. Before starting this ...
Read more >Handling requests - Ktor
This returns the ApplicationRequest instance and provides access to various request parameters. For example, the code snippet below shows ...
Read more >Creating and configuring a client - Ktor
import io.ktor.client.engine.cio.* val client = HttpClient(CIO). In this example, we use the CIO engine. You can also omit an engine:.
Read more >Creating HTTP APIs - Ktor
Website: Leave the default example.com value as a domain used to ... When a client makes such a request, content negotiation allows the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates? Still present in 1.6.7.
I can still reproduce it using Ktor 1.6.0 when running a development server with the following code: