feat: better exports for requests

This commit is contained in:
janishutz committed 2026-09-22 08:07:43 +02:00
1 parent f0ed64d0de
commit f39a0dfb45
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@janishutz/oidc-login-sdk-browser",
"version": "1.3.1",
"version": "1.3.2",
"description": "SDK to communicate with and log into a backend running express-openid-connect",
"homepage": "https://github.com/janishutz/oidc-login-sdk#readme",
"bugs": {
+4 -4
View File
@@ -16,7 +16,7 @@ export class UnownedError extends Error {}
* @param authErrorResolution - The mean of authentication error resolution
* @returns The reponse
*/
const get = async ( url: string, authErrorResolution?: AuthErrorResolution ): Promise<Response> => {
export const get = async ( url: string, authErrorResolution?: AuthErrorResolution ): Promise<Response> => {
return await wrapper( url, {
'credentials': 'include'
}, authErrorResolution );
@@ -30,7 +30,7 @@ const get = async ( url: string, authErrorResolution?: AuthErrorResolution ): Pr
* @param authErrorResolution - The mean of authentication error resolution
* @returns The response
*/
const post = async ( url: string, payload: string, mime: string = 'application/json', authErrorResolution?: AuthErrorResolution ): Promise<Response> => {
export const post = async ( url: string, payload: string, mime: string = 'application/json', authErrorResolution?: AuthErrorResolution ): Promise<Response> => {
return await wrapper( url, {
'credentials': 'include',
'body': payload,
@@ -47,7 +47,7 @@ const post = async ( url: string, payload: string, mime: string = 'application/j
* @param authErrorResolution - The mean of authentication error resolution
* @returns The response
*/
const deleteRequest = async ( url: string, authErrorResolution?: AuthErrorResolution ): Promise<Response> => {
export const deleteRequest = async ( url: string, authErrorResolution?: AuthErrorResolution ): Promise<Response> => {
return await wrapper( url, {
'credentials': 'include',
'method': 'delete'
@@ -58,7 +58,7 @@ const deleteRequest = async ( url: string, authErrorResolution?: AuthErrorResolu
* Retrieve the configured backend URL
* @returns The URL to the backend
*/
const getBackendURL = () => {
export const getBackendURL = () => {
return config.get().backendURL;
};