Download a chapter's file through a source
const url = 'http://localhost:8080/api/v1/me/extensions/example/file?ref=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8080/api/v1/me/extensions/example/file?ref=example' \ --header 'Authorization: Bearer <token>'Follow the file.url link getRemoteChapterContent returns rather than building it. The server downloads the file whole from the source’s declared sites, up to 128 MiB, checks it starts as its format does, and sends it with that format’s media type. There are no byte ranges; keep the download and revalidate with ETag.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The extension’s reverse-DNS id.
Query Parameters
Section titled “Query Parameters”Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”The file.
Headers
Section titled “Headers”Changes whenever the file’s content changes. Send it back in If-None-Match.
The client’s copy is current.
The request was malformed.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The request has no valid session token.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The signed-in user may not do this. demo_account when the user is a
shared demo account, named in CHEK_DEMO_USERS, which can’t change
its password, sessions, sign-in providers, extensions or annotations.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The resource does not exist.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The server failed; details are in its log.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The extension reported an error, went over a limit, or the image couldn’t be fetched.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}