function store
store(
httpService: HttpService,
request: HttpRequest
): void

Files a request, newest last, naming it as it goes and dropping the oldest once there are REQUESTS_KEPT of them.

import { create, store } from './http-service.ts';

const httpService = create();
store(httpService, { id: 0, request: { verb: 'GET', url: 'http://x/', headers: new Map(),
  body: null }, response: null, failed: 'refused', ms: 1, at: 0 });
httpService.requests.length; // 1

Parameters

httpService: HttpService
request: HttpRequest

Return Type

void

Usage

import { store } from "lib/repl/http-service.ts";