Skip to content

Commit

Permalink
feature: support http range requests in electron
Browse files Browse the repository at this point in the history
  • Loading branch information
levivilet committed Dec 27, 2024
1 parent e4d8690 commit 669ef91
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as GetPathName from '../GetPathName/GetPathName.ts'
import * as GetResponse from '../GetResponse/GetResponse.ts'
import * as SerializeResponse from '../SerializeResponse/SerializeResponse.ts'

export const getResponse = async (method: string, url: string): Promise<ElectronResponse> => {
export const getResponse = async (method: string, url: string, headers?: any): Promise<ElectronResponse> => {
const info = GetInfo.getInfo(url)
let pathName = GetPathName.getPathName2(url)
if (pathName === '/') {
Expand All @@ -14,7 +14,7 @@ export const getResponse = async (method: string, url: string): Promise<Electron
const requestOptions = {
method,
path: pathName,
headers: {}, // TODO support headers and range requests
headers: headers || {},
}
const handlerOptions: HandlerOptions = {
contentSecurityPolicy: info.contentSecurityPolicy,
Expand Down

0 comments on commit 669ef91

Please sign in to comment.