async check()

in src/convert.ts [254:268]


  async check(requests: ParsedRequest[]): Promise<boolean> {
    const response = await fetch(`${this.baseUrl}/check`, {
      method: "POST",
      body: JSON.stringify({ requests: getSlimRequests(requests) }),
      headers: { "Content-Type": "application/json" },
    });
    if (response.ok) {
      const json = await response.json();
      if (json.error) {
        throw new Error(json.error);
      }
      return json.return;
    }
    throw new Error("Could not make web request");
  }