Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Remove unused fetchOkNoContent fn
Sebastian Martinez committed 2 years ago
commit 643d61ae2b12053e3c998a5331019cade39179f4
parent 36b3fb80322d5e6c0d155af977d49f6f9ba3de90
1 file changed +0 -17
modified httpd-client/lib/fetcher.ts
@@ -117,23 +117,6 @@ export class Fetcher {
    }
  }

-
  // Execute a fetch and ignore the response body.
-
  //
-
  // Throws `ResponseError` if the response status code is not `200`.
-
  public async fetchOkNoContent(params: FetchParams): Promise<void> {
-
    const response = await this.fetch(params);
-

-
    if (!response.ok) {
-
      let responseBody = await response.text();
-
      try {
-
        responseBody = JSON.parse(responseBody);
-
      } catch (_e: unknown) {
-
        // We keep the original text response body.
-
      }
-
      throw new ResponseError(params.method, response, responseBody);
-
    }
-
  }
-

  private async fetch({
    method,
    path,