@trayio/commons 4.63.0 → 4.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.abstract.test.d.ts","sourceRoot":"","sources":["../../src/http/HttpClient.abstract.test.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"HttpClient.abstract.test.d.ts","sourceRoot":"","sources":["../../src/http/HttpClient.abstract.test.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,QA8tBpD"}
|
|
@@ -265,6 +265,18 @@ function httpClientTest(httpClient) {
|
|
|
265
265
|
const resultE = await result();
|
|
266
266
|
expect(resultE).toStrictEqual(E.right(testValue));
|
|
267
267
|
});
|
|
268
|
+
test('should send a GET request with an empty header', async () => {
|
|
269
|
+
const response = await httpClient.execute(Http_1.HttpMethod.Get, baseUrl, Http_1.HttpRequest.create({
|
|
270
|
+
headers: { '': '' },
|
|
271
|
+
pathParams: {},
|
|
272
|
+
queryString: {},
|
|
273
|
+
body: BufferExtensions_1.BufferExtensions.arrayBufferToReadable(new ArrayBuffer(0)),
|
|
274
|
+
}))();
|
|
275
|
+
if (E.isLeft(response)) {
|
|
276
|
+
throw new Error('Got left expected right');
|
|
277
|
+
}
|
|
278
|
+
expect(response.right.statusCode).toEqual(200);
|
|
279
|
+
});
|
|
268
280
|
test('should send a GET request with a certificate', async () => {
|
|
269
281
|
const response = await httpClient.execute(Http_1.HttpMethod.Get, httpsServerUrl, Http_1.HttpRequest.create({
|
|
270
282
|
headers: { 'x-custom-header': 'customVal' },
|