/api/v1/streaming/public/local

master
Charles Iliya Krempeaux 2024-08-07 10:47:47 -07:00
parent b03ab6e76d
commit 5b08301d9b
2 changed files with 11 additions and 0 deletions

View File

@ -25,6 +25,16 @@ func DialHost(host string) (Client, error) {
} }
func Dial(req *http.Request) (Client, error) { func Dial(req *http.Request) (Client, error) {
if nil == req {
return nil, errNilHTTPRequest
}
if nil == req.URL {
req.URL = new(url.URL)
}
req.URL.Path = Path
sseclient, err :=httpsse.Dial(req) sseclient, err :=httpsse.Dial(req)
if nil != err { if nil != err {
return nil, err return nil, err

View File

@ -6,6 +6,7 @@ import (
const ( const (
errNilDestination = erorr.Error("mstdn: nil destination") errNilDestination = erorr.Error("mstdn: nil destination")
errNilHTTPRequest = erorr.Error("mstdn: nil http-request")
errNilHTTPSSEClient = erorr.Error("mstdn: nil http-sse-client") errNilHTTPSSEClient = erorr.Error("mstdn: nil http-sse-client")
errNilReceiver = erorr.Error("mstdn: nil receiver") errNilReceiver = erorr.Error("mstdn: nil receiver")
) )