fabiobento512 / FRequest

FRequest - A fast, lightweight and opensource desktop application to make HTTP(s) requests
https://fabiobento512.github.io/FRequest
GNU General Public License v3.0
167 stars 15 forks source link

localhost subdomain issues #29

Closed Themis3000 closed 2 years ago

Themis3000 commented 2 years ago

Hi, I'm trying to utilize subdomains for a locally hosted test api I'm working on. When I try to make a request to localhost with a subdomain I always get N/A status code and the description "Host api.localhost not found". The full path I'm trying to access is http://api.localhost:8180/. This address is accessible from the browser, but in doesn't work when I try to make a request from FRequest.

I've additionally attempted hosting the api service on port 80 and making the full path just http://api.localhost/, but I run into the same issue.

Themis3000 commented 2 years ago

Found that this isn't an issue with this program. It seems like my browser just maps *.localhost to 127.0.0.1 on it's own, but no http client does that on it's own that I can tell.

I solved this by adding 127.0.0.1 api.localhost to my hosts file.

fabiobento512 commented 2 years ago

Thanks for sharing the solution, I hadn't time to check (and I have never seen subdomains on localhost itself before).