Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP tweaks to work better in the browser #1

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"build": "yarn run clean && tsc -p ./tsconfig.lib.json"
},
"dependencies": {
"@mswjs/interceptors": "^0.25.16",
"headers-polyfill": "^4.0.2",
"localforage": "^1.10.0",
"lodash.get": "^4.4.2",
Expand Down
6 changes: 3 additions & 3 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const postError = async (
const response = await post(
errorSinkUrl,
errorPayload,
options.headers.Authorization
options.headers.authorization
);
return response;
} catch (e) {
Expand All @@ -27,13 +27,13 @@ const postEvents = async (
const response = await post(
eventSinkUrl,
data,
options.headers.Authorization
options.headers.authorization
);
return response;
};

const fetchRemoteConfig = async (configUrl: string, options: HeaderOptionType) => {
const response = await get(configUrl, options.headers.Authorization);
const response = await get(configUrl, options.headers.authorization);
return JSON.parse(response);
}

Expand Down
Loading