mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-22 22:55:28 +00:00
@@ -92,7 +92,8 @@ func (client *Client) Call(service, endpoint string, request, response interface
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// TODO: make optional
|
|
||||||
|
// set the url to go through the v1 api
|
||||||
uri.Path = "/v1/" + service + "/" + endpoint
|
uri.Path = "/v1/" + service + "/" + endpoint
|
||||||
|
|
||||||
b, err := marshalRequest(service, endpoint, request)
|
b, err := marshalRequest(service, endpoint, request)
|
||||||
@@ -140,8 +141,9 @@ func (client *Client) Stream(service, endpoint string, request interface{}) (*St
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// TODO: make optional
|
|
||||||
uri.Path = "/client/stream"
|
// set the url to go through the v1 api
|
||||||
|
uri.Path = "/v1/" + service + "/" + endpoint
|
||||||
|
|
||||||
// replace http with websocket
|
// replace http with websocket
|
||||||
uri.Scheme = strings.Replace(uri.Scheme, "http", "ws", 1)
|
uri.Scheme = strings.Replace(uri.Scheme, "http", "ws", 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user