@@ -6,21 +6,22 @@ import { getGlobalClientData } from "./global";
66import { isClientConnected } from "./is" ;
77
88const KLEPPER_HOST = process . env . KLEPPER_HOST || "localhost" ;
9- const KLEPPER_API = process . env . KLEPPER_API || "/test " ;
10- const KLEPPER_PORT = process . env . KLEPPER_PORT || 3000 ;
9+ const KLEPPER_API = process . env . KLEPPER_API || "/sdk/incident " ;
10+ const KLEPPER_PORT = process . env . KLEPPER_PORT || 8080 ;
1111
1212const createHttpOptions = ( event : KlepperEvent ) : http . RequestOptions => {
1313 const client = getGlobalClientData ( ) ;
1414
15- const { privateKey } = client ;
15+ const { privateKey, appId } = client ;
1616 const baseOptions : RequestOptions = {
1717 hostname : KLEPPER_HOST ,
1818 port : + KLEPPER_PORT ,
1919 method : "POST" ,
2020 headers : {
2121 "Content-Type" : "application/json" ,
2222 "Content-Length" : `${ Buffer . byteLength ( JSON . stringify ( event ) ) } ` ,
23- "Klepper-Project-Key" : privateKey as string ,
23+ "klepper-project-key" : String ( privateKey ) ,
24+ "klepper-app-id" : String ( appId ) ,
2425 } ,
2526 } ;
2627
@@ -74,7 +75,7 @@ export const sendEvent = async (
7475
7576 res . on ( "error" , reject ) ;
7677 } ) ;
77-
78+
7879 request . on ( "error" , reject ) ;
7980
8081 request . on ( "timeout" , ( ) => {
0 commit comments