Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

How to Access Over Internet #47

Open
spriyabalan opened this issue Nov 19, 2021 · 2 comments
Open

How to Access Over Internet #47

spriyabalan opened this issue Nov 19, 2021 · 2 comments

Comments

@spriyabalan
Copy link

Instead of calling from command prompt as curl -X GET https://localhost:3000/identity i want to call it from my application through rest API. say for example from Postman. how can i do that. Assuming my hostname is abc.xyz.com i am trying it in postman as https://abc.xyz.com:3000/identity its giving 500 internal server error

@Nortberg
Copy link

Please see that there is no issue related to the source. (the question is too width)
Anyway it's a question - i'll try to answer and You also should if You have found a solution.
Postman is not the best option to test more complicated API If You want to access to beta services via application (Your app)
0. (obvious) Have server accessible on public address and open port - SSL/ Proxy etc. (eg. nginx with certboot there is a lot of tutorials)

  1. You must see/analyze the header and body (both req/resp) for that service so !LOCALLY! switch off ssl and use http (not https) and then
  2. Use CURL with [ --trace - ]parameter to see header and body on both sides.
  3. Implement the same structure You see on CURL to You APP and have a fun.

There is one point to raise according to that lib;
When You start a service use [--http1 ] parameter I have spend some time to realize that there is a problem with http2 and still not sure if the problem is on lib side or on my server/proxy/etc.

@phillmac
Copy link
Contributor

phillmac commented Dec 23, 2021 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants