mirror of
https://github.com/tlsnotary/tlsn-js.git
synced 2026-01-08 20:18:01 -05:00
fix: change to post with body and header
This commit is contained in:
10
src/tlsn.ts
10
src/tlsn.ts
@@ -109,7 +109,15 @@ export default class TLSN {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getSessionId(notaryUrl: string) {
|
async function getSessionId(notaryUrl: string) {
|
||||||
const resp = await fetch(notaryUrl + '/session');
|
const resp = await fetch(notaryUrl + '/session', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
clientType: 'Websocket',
|
||||||
|
}),
|
||||||
|
});
|
||||||
const json = await resp.json();
|
const json = await resp.json();
|
||||||
return json.session_id;
|
return json.session_id;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user