fix: change to post with body and header

This commit is contained in:
tsukino
2024-04-13 17:56:59 +02:00
parent 832f1b3ccc
commit f9c87b17b5

View File

@@ -109,7 +109,15 @@ export default class TLSN {
}
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();
return json.session_id;
}