parent
8c150add43
commit
fcc5d4e39b
|
@ -39,12 +39,17 @@ type LogManagerRequestBody struct {
|
|||
Logs []string
|
||||
}
|
||||
|
||||
func LogManagerRequestClient(requestMethod string, url string, body interface{}) {
|
||||
func LogManagerRequestClient(requestMethod string, body interface{}) {
|
||||
if usedLogManagerServerUrl == "" {
|
||||
log.Error().Msgf("Log manager server url is not set, skipping request")
|
||||
return
|
||||
}
|
||||
|
||||
a := fiber.AcquireAgent()
|
||||
|
||||
req := a.Request()
|
||||
req.Header.SetMethod(requestMethod)
|
||||
req.SetRequestURI(url)
|
||||
req.SetRequestURI(usedLogManagerServerUrl + "/v1/log")
|
||||
req.Header.SetContentType("application/json")
|
||||
|
||||
reqestBodyBytes, err := json.Marshal(body)
|
||||
|
|
Loading…
Reference in New Issue