0

I am documenting a web API and I need the curl and httpie examples to be a valid calls to our endpoints. The problem is that the example curl snippet includes a port number and I dont see any way to get rid of it. I see how to set the port number, but I dont see how to get rid of it completely.

Am I missing something? It seems like this would be a common use case.

Thanks in advance for any help!

  • Please improve your question to show the sample code in question including any attempts you have made to do it without the port number. – Noah Sep 27 '16 at 16:54

1 Answers1

5

If you set the port to the value that's the default for the scheme then it will be omitted from the curl snippet (and other snippets that include the URI). The defaults are 80 for http and 443 for https.

Andy Wilkinson
  • 108,729
  • 24
  • 257
  • 242
  • Thank you, Andy! This is exactly what I was looking for. Did I miss this in the docs somewhere? Tried to up vote you, but I don't have the rep. – the_coding_cowboy Sep 27 '16 at 22:07