Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@web3api/http-plugin-js
Advanced tools
Http plugin curently supports two different methods GET
and POST
. Similar to calling axios, when defining request you need to specify a response type. Headers and query parameters may also be defined.
TEXT
- The server will respond with text, the HTTP plugin will return the text as-is.
BINARY
- The server will respond with binary data (ArrayBuffer), the HTTP plugin will encode as a base64 string and return it.
Below is sample invocation of the GET
request with custom request headers and query parameters (urlParams
).
const response = await web3ApiClient.query<{ get: Response }>({
uri: new Uri("w3://ens/http.web3api.eth"),
query: `
query {
get(
url: "http://www.example.com/api"
request: {
responseType: TEXT
urlParams: [{key: "query", value: "foo"}]
headers: [{key: "X-Request-Header", value: "req-foo"}]
}
)
}
`
})
Below is sample invocation of the POST
request with custom request headers and query parameters (urlParams
). It is also possible to set request body as shown below.
const response = await web3ApiClient.query<{ get: Response }>({
uri: new Uri("w3://ens/http.web3api.eth"),
query: `
query {
post(
url: "http://www.example.com/api"
request: {
responseType: TEXT
urlParams: [{key: "query", value: "foo"}]
headers: [{key: "X-Request-Header", value: "req-foo"}]
body: "{data: 'test-request'}"
}
)
}
`
})
Web3API 0.0.1-prealpha.58
@web3api/client-js
: Added noDecode
invocation option.@web3api/client-js
: Added noDefaults
constructor option.@web3api/ethereum-plugin-js
: The encodeParams
now properly parses arguments of type Array & Tuple.FAQs
Web3API HTTP Javascript Plugin
The npm package @web3api/http-plugin-js receives a total of 12 weekly downloads. As such, @web3api/http-plugin-js popularity was classified as not popular.
We found that @web3api/http-plugin-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.