firecamp-dev / firecamp

Developer-first OpenSource API DevTool, Postman/Insomnia alternative.
https://firecamp.dev
GNU Affero General Public License v3.0
2.1k stars 137 forks source link

[bug]: Unable to make http request #140

Closed PhillipMwaniki closed 1 year ago

PhillipMwaniki commented 1 year ago

Describe the bug I'm unable to make a http request to an endpoint. I've tried changing the Browser Agent to Cloud Agent but nothing changed.

To Reproduce Steps to reproduce the behavior:

  1. Make a post request to a local domain i.e. myproject.test

Expected behavior A json response from the server, whether successful or not

Screenshots Screenshot 2023-11-01 at 14 28 56

Desktop (please complete the following information):

Nishchit14 commented 1 year ago

Is it a localhost server? @PhillipMwaniki

PhillipMwaniki commented 1 year ago

Yeah it's on localhost. I'm using a tool called Herd which creates local domains for my projects

Nishchit14 commented 1 year ago

The local server can not be accessed by the cloud agent. You can allow https://firecamp.dev domain in your CORS policy locally and set browser agent

Here are other solutions

  1. read this CORS note from this doc https://firecamp.io/docs/platform/firecamp-agent#agent-comparison
  2. use desktop application, it's coming soon. you can watch this branch https://github.com/firecamp-dev/firecamp/tree/feat/62-desktop
PhillipMwaniki commented 1 year ago

Thanks for the prompt response @Nishchit14. I'll watch the branch