Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
byu-api-request
Advanced tools
Utility for making a server to server request using BYU's API gateway authentication
Utility for making a server to server request using BYU's current API gateway authentication method
Requires Node 18+
npm i --save byu-api-request
This package will automatically generate the host domain to be used based on your environment variables. You need to have a variable named ENVIRONMENT_NAME in you environment variables and have it assigned to one of the following values:
prd
for Productiondev
for Sandboxapidev
for API DevelopmentSet up with setOauthSettings
and then make requests with request
Examples:
const api = require('byu-api-request')
(async () => {
// Do this once on startup
await api.setOauthSettings('myClientKey', 'myClientSecret')
// After that, make all the requests you want
try {
// Simple GET request
const response1 = await api.request({ url: `/echo/v1/echo/test` })
// Request using another method
const response2 = await api.request({ method: 'PUT', url: `/byuapi/students/v2/123456789/enrolled_classes/Summer2019,BIO,100,001`, body: { credit_hours: 3 } })
// Request that passes along an original JWT
const response3 = await api.request({ url: `/echo/v1/echo/test` }, 'some original jwt to pass along')
// Request where you want to know what status code came back (instead of just rejecting if it's not 2XX)
const response4 = await api.request({ url: `/echo/v1/echo/test`, simple: false, resolveWithFullResponse: true })
} catch (e) {
console.error(e) // Handle errors
}
})
For more information on the options you can use for the request
function, see fetch.
FAQs
Utility for making a server to server request using BYU's API gateway authentication
The npm package byu-api-request receives a total of 1 weekly downloads. As such, byu-api-request popularity was classified as not popular.
We found that byu-api-request demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.