/api/v1/streaming/public/local
parent
b03ab6e76d
commit
5b08301d9b
|
@ -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
|
||||||
|
|
|
@ -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")
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue