Provide http(s) default port method
See original GitHub issueIt feels like a magic number to use 80
or 443
in the UriConfigurer#withPort
method to suppress the port output given the right scheme.
There should be a method to set this magic number without user getting to see or having to use it like withHttpPort
or withHttpsPort
.
I know it is a small change but I think the right way is to discuss it before opening a PR.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Default Port Numbers - Oracle Help Center
Port IP Protocol Direction
22 TCP SSH To library
25 TCP SMTP From library
53 TCP & UDP DNS From library
Read more >Enable ports 80 (HTTP) and 443 (HTTPS) - PaperCut
Enable ports 80 (HTTP) and 443 (HTTPS). By default, PaperCut NG/MF listens to ports 9191 and 9192 for HTTP and HTTPS communication respectively....
Read more >Why do we need to specify a port number while using HTTP ...
The default port for HTTP is 80 and HTTPS is 443 but port numbers range from 0 to 65535. Most web servers listen...
Read more >What are port numbers and how do they work? - TechTarget
Port 80. HTTP is the protocol that enables the World Wide Web. Port 123. Network Time Protocol helps computer clocks sync with each...
Read more >Configure client communication ports - Configuration Manager
The default values for client request ports are 80 for HTTP traffic and 443 for HTTPS traffic. Change them only if you don't...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
How about
withHttp()
andwithHttps()
methods that set both the scheme and the port? They’d be shorthand forwithScheme("http").withPort(80)
andwithScheme("https").withPort(443)
respectively.This simple improvement just points out how complicated it can be to introduce such a little change. I can understand that the pro and cons put this on the bottom on the list. (deleting local branch 😁 )