1.0.3 • Published 4 months ago
@sfdocs-internal/http-code-snippets v1.0.3
<http-code-snippets>
Code snippets to render code implementation examples for a HTTP request.
Example
<http-code-snippets url="https://api.github.com/authorizations" method="POST" payload='{"scopes": ["public_repo"]}'></http-code-snippets>
Usage
Installation
npm install --save @advanced-rest-client/http-code-snippets
In an html file
<html>
<head>
<script type="module">
import './node_modules/@advanced-rest-client/http-code-snippets/http-code-snippets.js';
</script>
</head>
<body>
<http-code-snippets url="https://api.github.com/authorizations" method="POST" payload='{"scopes": ["public_repo"]}'></http-code-snippets>
</body>
</html>
In a LitElement
import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/http-code-snippets/http-code-snippets.js';
class SampleElement extends PolymerElement {
render() {
const {
url,
method,
headers,
payload
} = this;
return html`
<http-code-snippets
.url="${url}"
.method="${method}"
.headers="${headers}"
.payload="${payload}"></http-code-snippets>
`;
}
}
customElements.define('sample-element', SampleElement);
Development
git clone https://github.com/advanced-rest-client/http-code-snippets
cd http-code-snippets
npm install
Running the demo locally
npm start
Running the tests
npm test
API components
This component is a part of API components ecosystem
1.0.3
4 months ago
1.0.2
4 months ago
1.0.1
2 years ago
1.0.1-alpha
2 years ago
1.0.3-alpha-codeItr1
2 years ago
1.0.0
2 years ago
1.0.3-alpha
2 years ago
1.0.3-alpha-codeItr4
2 years ago
1.0.3-alpha-codeItr3
2 years ago
1.0.3-alpha-codeItr2
2 years ago
1.0.3-alpha-select
2 years ago
1.0.3-alpha-divSelectorCss
2 years ago
1.0.3-alpha-divSelector
2 years ago
1.0.3-alpha-codePreview
2 years ago
1.0.3-alpha-codeItr5-scroll
2 years ago
1.0.2-alpha
2 years ago
1.0.3-alpha-codeBlock
2 years ago
1.0.3-alpha-divSelectors
2 years ago
1.0.6-alpha-Itr1-scroll
2 years ago
1.0.3-alpha-codeUAT
2 years ago
1.0.3-alpha-codeBlocks
2 years ago
1.0.0-alpha
2 years ago
4.0.1
2 years ago