-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
From ngn-core created by coreybutler : ngnjs/ngn-core#22
A library of constants may help simplify network requests. This would likely be best as an extension to NGN instead of a core element of the library, since it is not required to make a network request.
Just a few examples:
NGN.NET.PORT.HTTPrefers to port 80NGN.NET.PORT.HTTPS&NGN.NET.PORT.TLSrefer to port 443NGN.NET.PORT.LDAPrefers to port 53NGN.NET.PORT.SLDAPrefers to port 686NGN.NET.PORT.SSHrefers to port 21NGN.NET.PORT.SMTPrefers to port 25
These could also be aliased with friendly names like NGN.NET.PORT.EMAIL which could refer to the SMTP port.
The purpose of these constants is to simplify network connectivity for developers who are less familiar with common port values.
Additionally, HTTP status code constants/references may be useful.
A few examples include:
NGN.NET.STATUS.OKrefers to 200.NGN.NET.STATUS.SUCCESSrefers to 2XX.NGN.NET.STATUS.FAILURErefers to 4XX and 5XX.NGN.NET.STATUS.DENIEDrefers to 401.
Metadata
Metadata
Assignees
Labels
No labels