@@ -73,15 +73,18 @@ export async function createWebhook(
73
73
) : Promise < WebhookSingleResponse > {
74
74
try {
75
75
const authToken = await getAuthToken ( ) ;
76
- const response = await fetch ( `${ THIRDWEB_INSIGHT_API_DOMAIN } /v1/webhooks` , {
77
- method : "POST" ,
78
- headers : {
79
- "Content-Type" : "application/json" ,
80
- "x-client-id" : clientId ,
81
- Authorization : `Bearer ${ authToken } ` ,
76
+ const response = await fetch (
77
+ `https://${ THIRDWEB_INSIGHT_API_DOMAIN } /v1/webhooks` ,
78
+ {
79
+ method : "POST" ,
80
+ headers : {
81
+ "Content-Type" : "application/json" ,
82
+ "x-client-id" : clientId ,
83
+ Authorization : `Bearer ${ authToken } ` ,
84
+ } ,
85
+ body : JSON . stringify ( payload ) ,
82
86
} ,
83
- body : JSON . stringify ( payload ) ,
84
- } ) ;
87
+ ) ;
85
88
86
89
if ( ! response . ok ) {
87
90
const errorText = await response . text ( ) ;
@@ -105,13 +108,16 @@ export async function getWebhooks(
105
108
) : Promise < WebhooksListResponse > {
106
109
try {
107
110
const authToken = await getAuthToken ( ) ;
108
- const response = await fetch ( `${ THIRDWEB_INSIGHT_API_DOMAIN } /v1/webhooks` , {
109
- method : "GET" ,
110
- headers : {
111
- "x-client-id" : clientId ,
112
- Authorization : `Bearer ${ authToken } ` ,
111
+ const response = await fetch (
112
+ `https://${ THIRDWEB_INSIGHT_API_DOMAIN } /v1/webhooks` ,
113
+ {
114
+ method : "GET" ,
115
+ headers : {
116
+ "x-client-id" : clientId ,
117
+ Authorization : `Bearer ${ authToken } ` ,
118
+ } ,
113
119
} ,
114
- } ) ;
120
+ ) ;
115
121
116
122
if ( ! response . ok ) {
117
123
const errorText = await response . text ( ) ;
@@ -137,7 +143,7 @@ export async function deleteWebhook(
137
143
try {
138
144
const authToken = await getAuthToken ( ) ;
139
145
const response = await fetch (
140
- `${ THIRDWEB_INSIGHT_API_DOMAIN } /v1/webhooks/${ encodeURIComponent ( webhookId ) } ` ,
146
+ `https:// ${ THIRDWEB_INSIGHT_API_DOMAIN } /v1/webhooks/${ encodeURIComponent ( webhookId ) } ` ,
141
147
{
142
148
method : "DELETE" ,
143
149
headers : {
@@ -171,7 +177,7 @@ export async function testWebhook(
171
177
try {
172
178
const authToken = await getAuthToken ( ) ;
173
179
const response = await fetch (
174
- `${ THIRDWEB_INSIGHT_API_DOMAIN } /v1/webhooks/test` ,
180
+ `https:// ${ THIRDWEB_INSIGHT_API_DOMAIN } /v1/webhooks/test` ,
175
181
{
176
182
method : "POST" ,
177
183
headers : {
0 commit comments