foss42 / apidash

API Dash is a beautiful open-source cross-platform API Client built using Flutter which can help you easily create & customize your API requests, visually inspect responses and generate API integration code. It is supported for macOS, Windows, Linux, Android & iOS. A lightweight alternative to postman/insomnia.
https://apidash.dev
Apache License 2.0
1.56k stars 291 forks source link

apidash does not work on local backend #378

Closed vinaytiparadi closed 5 months ago

vinaytiparadi commented 6 months ago

Describe the bug/problem Screenshot 2024-04-05 233957 Screenshot 2024-04-05 234245

apidash does work while running backend locally, always throws an error whether it is HandshakeException or ClientException as shown in the above screenshots whereas the same api call works perfectly fine on postman.

Steps to Reproduce the bug/problem

  1. Create any simple api.
  2. Try to call that api using apidash.

Expected behavior Make a request to the local server and return a response.

Device Info (The device where you encountered this issue):

animator commented 6 months ago

Hi @vinaytiparadi We are currently unable to reproduce the first issue (ClientException) after running some local backends (fastapi, node, etc) where it is working. Can you please provide a sample backend code which gives an issue at your end so that we can run the same at our end and recreate the issue. The second issue of HandshakeException is a known issue (https://github.com/dart-lang/http/issues/627). Do let me know if I am correct.

yashas-hm commented 6 months ago

@vinaytiparadi For the first screenshot the error might be because a crash or error in the local backend as the connection closed before receiving any response.

Additionally for the second screenshot, you cannot use https while making api calls to the local backend as local machine will not have any CA Certificate and hence the connection is not secured as required by the HTTPS protocol, hence the handshake error. This will happen if you try in any browser too. Unless you add a CA Certificate to your development machine.

animator commented 5 months ago

Closing this issue due to lack of response necessary to recreate the issue.