A request workspace component for Advanced REST Client that creates a list of requests

Usage no npm install needed!

<script type="module">
  import advancedRestClientArcRequestWorkspace from 'https://cdn.skypack.dev/@advanced-rest-client/arc-request-workspace';


Published on NPM

Build Status

Published on webcomponents.org


A request workspace component for Advanced REST Client. It is a top level component for ARC to render request editor view.



npm install --save @advanced-rest-client/arc-request-workspace

In an html file

    <script type="module">
      import './node_modules/@advanced-rest-client/arc-request-workspace/arc-request-workspace.js';

In a LitElement

import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/arc-request-workspace/arc-request-workspace.js';

class SampleElement extends LitElement {
  render() {
    return html`
customElements.define('sample-element', SampleElement);

Workspace state events

The element dispatches workspace-state-read custom event to request for workspace data and workspace-state-store to request to store the data in a store.

Data to be stored and later on restored are under value property of workspace-state-store event's detail object. The data may contain huge amount of data as it stores list of requests with responses. Some storage solutions may not be adequate to store such amount of data.

Example implementation

window.addEventListener('workspace-state-read', (e) => {
  e.detail.result = new Promise((resolve) => {
    let data = localStorage.getItem('workspace.state');
    if (data) {
      data = JSON.parse(data)
window.addEventListener('workspace-state-store', (e) => {
  localStorage.setItem('workspace.state', JSON.stringify(e.detail.value));


git clone https://github.com/advanced-rest-client/arc-request-workspace
cd arc-request-workspace
npm install

Running the demo locally

npm start

Running the tests

npm test

API components

This components is a part of API components ecosystem