![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
lightning-request-net
Advanced tools
⚡ Lightweight Node.js HTTP client based on net.
npm i lightning-request-net --save
First, require the library.
const HttpRequestClient = require('lightning-request-net');
const client = new HttpRequestClient({
host: 'www.example.com',
port: 8680,
});
Then let's make a request in an async function.
(async function() {
try {
const result = await client.request({
method: 'POST',
path: '/foo',
});
console.log(result.statusCode); // response status code
console.log(result.data); // response data
} catch (error) {
console.log(error);
}
})();
These are the available config options for making requests. Only the path is required. Requests will default to GET if method is not specified.
{
// `path` is the server URL that will be used for the request
path: '/foo',
// `method` is the request method to be used when making the request
method: 'get', // default
// `headers` are custom headers to be sent
headers: {'Content-Type': 'application/json'},
// `data` is the data to be sent as the request body
data: {
foo: 'bar'
},
// `responseType` indicates the type of data that the server will respond with
// options are: 'json', 'text'
responseType: 'text', // default
}
The response for a request contains the following information.
{
// `statusCode` is the HTTP status code from the server response
statusCode: 200,
// `statusMessage` is the HTTP status message from the server response
statusMessage: 'OK',
// `headers` the headers that the server responded with All header names are lower cased
headers: {},
// `data` is the response data that was provided by the server
data: {}
}
FAQs
Lightweight Node.js HTTP client based on net.
The npm package lightning-request-net receives a total of 3 weekly downloads. As such, lightning-request-net popularity was classified as not popular.
We found that lightning-request-net demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.