support links in the proxy
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"net/url"
|
||||
"path"
|
||||
|
||||
"github.com/micro/go-micro/client"
|
||||
"github.com/micro/go-micro/config/options"
|
||||
"github.com/micro/go-micro/errors"
|
||||
"github.com/micro/go-micro/proxy"
|
||||
@@ -44,6 +45,10 @@ func getEndpoint(hdr map[string]string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (p *Proxy) SendRequest(ctx context.Context, req client.Request, rsp client.Response) error {
|
||||
return errors.InternalServerError("go.micro.proxy.http", "SendRequest is unsupported")
|
||||
}
|
||||
|
||||
// ServeRequest honours the server.Router interface
|
||||
func (p *Proxy) ServeRequest(ctx context.Context, req server.Request, rsp server.Response) error {
|
||||
if p.Endpoint == "" {
|
||||
|
Reference in New Issue
Block a user