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.HTTP refers to port 80
NGN.NET.PORT.HTTPS & NGN.NET.PORT.TLS refer to port 443
NGN.NET.PORT.LDAP refers to port 53
NGN.NET.PORT.SLDAP refers to port 686
NGN.NET.PORT.SSH refers to port 21
NGN.NET.PORT.SMTP refers 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.OK refers to 200.
NGN.NET.STATUS.SUCCESS refers to 2XX.
NGN.NET.STATUS.FAILURE refers to 4XX and 5XX.
NGN.NET.STATUS.DENIED refers to 401.
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 25These could also be aliased with friendly names like
NGN.NET.PORT.EMAILwhich 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.