
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
@advanced-rest-client/arc-definitions
Advanced tools
Internal data definitions used in ARC. Contains definitions for status codes and request and response headers.
Request / response headers and status codes definitions database used in Adavanced REST Client and API Console.
The <arc-definitions>
element listens for query events.
Other elements can dispatch the query-headers
and query-status-codes
events that are handled by this element. Events are stopped from propagation.
Handled event receives new property on the detail
object with the query result.
Each header definition item has the following properties:
key
- String, The name of the headerdesc
- String, The documentation for the headerexample
- String, Example value of the headerautocomplete
- Array of String, list of possible/example values for autocomplete functions. This property is not available for response headers.{
"key": "Accept-Charset",
"desc": "Character sets that are acceptable",
"example": "Accept-Charset: utf-8",
"autocomplete": ["utf-8"]
}
To query for the headers data dispatch query-headers
event:
const e = new CustomEvent('query-headers', {
detail: {
type: 'request', // or "response"
query: 'Acce'
},
bubbles: true,
cancelable: true
});
document.body.dispatchEvent(e);
console.log(event.defaultPrevented); // true
const headers = event.detail.headers; // Array[...]
or use imperative API:
const data = document.querySelector('arc-definitions').queryHeaders('A', 'response');
console.log(data); // list of headers with "A" in the name
Status code definition item has the following properties:
key
- Number, Code valuedesc
- String, The documentation for the status codelabel
- String, Status label associated with the code{
"key": 101,
"label": "Switching Protocols",
"desc":"This means the requester has asked the server to switch protocols and the server is acknowledging that it will do so"
}
To query for the status code definition dispatch query-status-codes
event:
const e = new CustomEvent('query-status-codes', {
detail: {
code: 200
},
bubbles: true,
cancelable: true
});
document.body.dispatchEvent(e);
console.log(event.defaultPrevented); // true
const statusCode = event.detail.statusCode; // {...}
or use imperative API:
const status = document.querySelector('arc-definitions').getStatusCode(201);
console.log(status); // Status code definition for 201
npm install --save @advanced-rest-client/arc-definitions
<html>
<head>
<script type="module">
import '@advanced-rest-client/arc-definitions/arc-definitions.js';
</script>
</head>
<body>
<arc-definitions></arc-definitions>
</body>
</html>
import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/arc-definitions/arc-definitions.js';
class SampleElement extends LitElement {
render() {
return html`
<arc-definitions></arc-definitions>
`;
}
}
customElements.define('sample-element', SampleElement);
import {PolymerElement, html} from '@polymer/polymer';
import '@advanced-rest-client/arc-definitions/arc-definitions.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<arc-definitions></arc-definitions>
`;
}
_authChanged(e) {
console.log(e.detail);
}
}
customElements.define('sample-element', SampleElement);
git clone https://github.com/advanced-rest-client/arc-definitions
cd arc-definitions
npm install
npm start
npm test
FAQs
Internal data definitions used in ARC. Contains definitions for status codes and request and response headers.
We found that @advanced-rest-client/arc-definitions 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
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.