Skip to content

Client download from remote URL in SvelteKit? #3893

Answered by mustofa-id
Vervo7 asked this question in Q&A
Discussion options

You must be logged in to vote

I believe you can do it using fetch.

export const get = async () => {
	const res = await fetch(`your url`)
	return {
		headers: { /* your headers */ },
		body: res.body
	}
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Vervo7
Comment options

@mustofa-id
Comment options

Answer selected by Vervo7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants