![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.
I simplify life! If you are on a project that requires a lot of api Calls I can just handle the data retrieval in a quick and efficient manner! Set a simple config file of the base URL and start making easier REST calls!
Howard is basically a factory function for an isomorphic-fetch call that extracts JSON and returns it as a promise. Do whatever you want with the Promise, tag it in a chain.....tap it and use the results? Make what you need to happen with it!
Including Howard:
import howard, { withDefaults, json, text, arrayBuffer, blob, formData, buffer} from 'howard';
json(howard('https://swapi.co/api/people/1/'))
.then((res) => {
/*
{
"name": "Luke Skywalker",
...
}
*/
})
Need Query Strings? put them in manually, or pass a param object!
const paramString = '?format=wookiee';
json(howard(`https://swapi.co/api/people/1${paramString}`, { method: 'GET' }))
.then((res) => {
/*
{
"whrascwo": "Lhuorwo Sorroohraanorworc",
"acwoahrracao": "172",
"scracc": "77",
...
}
*/
})
Using a param:
json(howard('https://swapi.co/api/people/1', { method: 'GET', params: { format: 'wookiee' } }))
.then((res) => {
return res;
})
If you need to set up a client with a default configuration, use the withDefaults
method and specify a config object that gets merged with options for every request. In this example we also use async await:
const api = withDefaults(config);
json(api('/people/1/'))
.then((res) =>{
console.log('res', res)
})
async function withDefaultsRequest() {
let response = await json(api('/people/1/', { method: 'GET'}));
return response;
/*
{
"name": "Luke Skywalker",
...
}
*/
}
withDefaultsRequest();
A Highly Opinionated Setup - The goal of this setup would to create a lib style setup and return the fetch with the assumption that most of the app is going to be delivering JSON. This would apply to almost all use cases.
import { withDefaults, json } from 'howard';
const api = withDefaults({
url: 'http://api.url.com',
});
export function apiFetch(path, options = {}) {
return json(api(path, options));
}
FAQs
A wrapper for isomorphic fetch
The npm package howard receives a total of 0 weekly downloads. As such, howard popularity was classified as not popular.
We found that howard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
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.