@ns8/ns8-switchboard-operator
Advanced tools
Comparing version
@@ -0,1 +1,3 @@ | ||
/// <reference types="node" /> | ||
import { URL } from 'url'; | ||
import { Order } from 'ns8-protect-models'; | ||
@@ -2,0 +4,0 @@ export default class V2Client { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fetch = require("isomorphic-fetch"); | ||
const url_1 = require("url"); | ||
class V2Client { | ||
withBaseUrl(baseUrl) { | ||
this.baseUrl = baseUrl; | ||
this.baseUrl = new url_1.URL('/protect', baseUrl); | ||
return this; | ||
@@ -20,3 +21,3 @@ } | ||
}; | ||
const url = `${this.baseUrl.toString()}/order`; | ||
const url = `${this.baseUrl}/order`; | ||
const response = await fetch(url, { method, body, headers }); | ||
@@ -23,0 +24,0 @@ if (response.status > V2Client.MAX_SUCCESS_CODE) { |
{ | ||
"name": "@ns8/ns8-switchboard-operator", | ||
"version": "1.0.18", | ||
"version": "1.0.19", | ||
"description": "Operator project contains switchboard interfaces and orchestration code", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
13602
0.98%188
1.62%