Skip to content

Instantly share code, notes, and snippets.

View elboletaire's full-sized avatar
🍄
hunting mushrooms

Òscar Casajuana elboletaire

🍄
hunting mushrooms
View GitHub Profile
const validateFrameEndpoint = "https://hubs.airstack.xyz/v1/validateMessage"
func ValidateFrameMessage(msg []byte) map[string]interface{} {
req, err := http.NewRequest(http.MethodPost, validateFrameEndpoint, bytes.NewBuffer(msg))
if err != nil {
log.Warn("error creating request:", err)
return nil
}
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)