wormhole-explorer/jobs/jobs/protocols/internal/commons/common.go

16 lines
233 B
Go

package commons
import (
"encoding/json"
"net/http"
)
func ToJson(headers http.Header) string {
bytes, _ := json.Marshal(headers)
return string(bytes)
}
type HttpDo interface {
Do(req *http.Request) (*http.Response, error)
}