add user-agent to http and ws requestor (#602)

* add user-agent to http and ws requestor

* wip

* fix review comment
This commit is contained in:
Hoan Luu Huu
2024-01-10 20:54:46 +07:00
committed by GitHub
parent 6f6d7a06b0
commit 29bbcf1be0
4 changed files with 14 additions and 1 deletions

View File

@@ -99,6 +99,8 @@ test('test create-call call-hook basic authentication', async(t) => {
let obj = await getJSON(`http:127.0.0.1:3100/lastRequest/${from}`)
t.ok(obj.headers.Authorization = 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=',
'create-call: call-hook contains basic authentication header');
t.ok(obj.headers['user-agent'] = 'jambonz',
'create-call: call-hook contains user-agent header');
disconnect();
} catch (err) {
console.log(`error received: ${err}`);