@advanced-rest-client/arc-response

中文文档
0.3.12发布于 2023/08/29Apache-2.0TypeScriptESM + CJS近 30 天下载 3164

A module containing the UI regions and the logic to render and support HTTP response in Advanced REST Client.

原始使用文档
文档目录10 节
  1. Usage
  2. Installation
  3. request-timings and request-timings-panel
  4. Example
  5. response-view
  6. response-body
  7. response-highlight
  8. Development
  9. Running the demo locally
  10. Running the tests

Deprecated

This component is deprecated. Use @advanced-rest-client/app instead.


A module containing the UI regions and the logic to render and support HTTP response in Advanced REST Client.

Published on NPM

Tests and publishing

Usage

Installation

npm install --save @advanced-rest-client/arc-response

request-timings and request-timings-panel

An element to render request timings information from HAR 1.2 timings object. The "panel" element renders a series of timings, including redirects.

Example

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

class SampleElement extends LitElement {
  render() {
    return html`
    <request-timings .timings="${this.har}"></request-timings>
    `;
  }
}
customElements.define('sample-element', SampleElement);

response-view

The main response view for the Advanced REST Client. It takes the ARC request object with the transport request data and the response data set on the element to generate the view from the data. The request and response objects types are defined in arc-types as ArcRequest.TransportRequest and ArcResponse.Response.

response-body

An element to render the response visualization matched its content type header of the response. In most cases it renders highlighted code via PrismJS. In some cases it renders specialized view for PDF, binary, and image files.

response-highlight

An element that performs syntax highlighting for the current body.

Development

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

Running the demo locally

npm start

Running the tests

npm test

版本与发布记录

@advanced-rest-client/arc-response 共发布 31 个版本,首次发布于 2020/10/05;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.3.12latest2023/08/293 年前
0.3.102022/02/234 年前
0.3.92022/02/164 年前
0.3.82021/10/215 年前
0.3.72021/10/085 年前
0.3.62021/08/145 年前

关于 @advanced-rest-client/arc-response 的常见问题

@advanced-rest-client/arc-response 是什么?

A module containing the UI regions and the logic to render and support HTTP response in Advanced REST Client.

如何安装 @advanced-rest-client/arc-response?

在项目目录运行 npm install @advanced-rest-client/arc-response,或使用 pnpm add / yarn add / bun add。

@advanced-rest-client/arc-response 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@advanced-rest-client/arc-response 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@advanced-rest-client/arc-response 可以商用吗?

@advanced-rest-client/arc-response 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@advanced-rest-client/arc-response 的下载量有多少?

根据 npm 官方下载统计,@advanced-rest-client/arc-response 在 2026/10/05 – 2026/11/03 这 30 天内被下载 3,164 次,日均约 105 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@advanced-rest-client/arc-response 还在维护吗?

最新版本 0.3.12 发布于 2023/08/29(3 年前);至今共发布 31 个版本,其中过去 12 个月发布了 0 个;首次发布于 2020/10/05。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。