packages/client/src/lib.js
/**
   * Removes stored content by its CID from this account. Please note that
   * even if content is removed from the service other nodes that have
   * replicated it might still continue providing it.
   *
   * @param {Service} service
   * @param {string} cid
   * @returns {Promise<void>}
   */
Removes stored content by its CID from this account. Please note that
even if content is removed from the service other nodes that have
replicated it might still continue providing it.

@param {Service} service
@param {string} cid
@returns {Promise}
Removes stored content by its CID from this account . Please note that even if content is removed from the service other nodes that have replicated it might still continue providing it . @param { Service } service @param { string } cid @returns { Promise }
static async delete(
    { endpoint, token, rateLimiter = globalRateLimiter },
    cid
  ) {
    const url = new URL(`${cid}/`, endpoint)
    await rateLimiter()
    const response = await fetch(url.toString(), {
      method: 'DELETE',
      headers: NFTStorage.auth(token),
    })
    if (response.status === 429) {
      throw new Error('rate limited')
    }
    const result = await response.json()
    if (!result.ok) {
      throw new Error(result.error.message)
    }
  }
static async delete ( { endpoint , token , rateLimiter = globalRateLimiter } , cid ) { const url = new URL ( ` ${ cid } ` , endpoint ) await rateLimiter ( ) const response = await fetch ( url . toString ( ) , { method : 'DELETE' , headers : NFTStorage . auth ( token ) , } ) if ( response . status === 429 ) { throw new Error ( 'rate limited' ) } const result = await response . json ( ) if ( ! result . ok ) { throw new Error ( result . error . message ) } }
Removes stored content by its CID from this account.
Removes stored content by its CID from this account .
/* c8 ignore next 3 */