|
|
@ -234,11 +234,13 @@ func PostReqForEachVoiceFile(reqDataForVoiceFile FailedDataListReqBody) (respons
|
|
|
|
|
|
|
|
|
|
|
|
func SendSTTResToNockChiServer(parsedRes FailedDataListReqBody, sttRes string, dir string) *icserror.IcsError {
|
|
|
|
func SendSTTResToNockChiServer(parsedRes FailedDataListReqBody, sttRes string, dir string) *icserror.IcsError {
|
|
|
|
|
|
|
|
|
|
|
|
url := conf.Urls.NockChiServerUrl
|
|
|
|
fullURL := conf.Urls.NockChiServer.BaseURL + conf.Urls.NockChiServer.EndPoint
|
|
|
|
|
|
|
|
headers := http.Header{
|
|
|
|
conn, _, err := websocket.DefaultDialer.Dial(url, nil)
|
|
|
|
"Origin": {conf.Urls.NockChiServer.BaseURL},
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
conn, _, err := websocket.DefaultDialer.Dial(fullURL, headers)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
l.Println("[ERR] client.go>SendSTTResToNockChiServer()> connecting websocket failed. err: %v", err)
|
|
|
|
l.Printf("[ERR] client.go>SendSTTResToNockChiServer()> connecting websocket failed. err: %v", err)
|
|
|
|
return icserror.ICSERRWEBSOCKETConnectFailError
|
|
|
|
return icserror.ICSERRWEBSOCKETConnectFailError
|
|
|
|
}
|
|
|
|
}
|
|
|
|
defer conn.Close()
|
|
|
|
defer conn.Close()
|
|
|
|