backk-frontend-utils
Advanced tools
Comparing version 1.0.2 to 1.0.3
import { Base64 } from 'js-base64'; | ||
import getJwtFromSessionStorage from './getJwtFromSessionStorage'; | ||
import { HTTPS_DEFAULT_PORT } from './constants/constants'; | ||
export default async function callRemoteService(microserviceName, serviceFunctionName, serviceFunctionArgument, microserviceNamespace, jwtStorageEncryptionKey, options) { | ||
const response = await fetch(`https://${window.location.host}/${microserviceName}.${microserviceNamespace}/${serviceFunctionName}`, { | ||
const serverPort = window.location.search | ||
? window.location.search.split('serverPort=').pop() ?? HTTPS_DEFAULT_PORT | ||
: HTTPS_DEFAULT_PORT; | ||
const response = await fetch(`https://${window.location.hostname}:${serverPort}/${microserviceName}.${microserviceNamespace}/${serviceFunctionName}`, { | ||
method: options?.httpMethod ?? 'POST', | ||
@@ -6,0 +10,0 @@ body: serviceFunctionArgument ? JSON.stringify(serviceFunctionArgument) : undefined, |
export declare const MAX_INT_VALUE = 2147483647; | ||
export declare const HTTPS_DEFAULT_PORT = "443"; | ||
export declare class Lengths { | ||
@@ -3,0 +4,0 @@ static readonly _1: number; |
export const MAX_INT_VALUE = 2147483647; | ||
export const HTTPS_DEFAULT_PORT = '443'; | ||
export class Lengths { | ||
@@ -3,0 +4,0 @@ static _1 = 1; |
{ | ||
"name": "backk-frontend-utils", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Web frontend utils for Backk microservices", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
40540
271