mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
Remove unused roundtripper code
This commit is contained in:
parent
8ab77fc3d7
commit
bcff71167c
@ -3,7 +3,6 @@ package client
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sync"
|
||||
|
||||
"github.com/micro/go-micro/broker"
|
||||
@ -18,10 +17,6 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
type headerRoundTripper struct {
|
||||
r http.RoundTripper
|
||||
}
|
||||
|
||||
type rpcClient struct {
|
||||
once sync.Once
|
||||
opts options
|
||||
@ -56,11 +51,6 @@ func newRpcClient(opt ...Option) Client {
|
||||
}
|
||||
}
|
||||
|
||||
func (t *headerRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
|
||||
r.Header.Set("X-Client-Version", "1.0")
|
||||
return t.r.RoundTrip(r)
|
||||
}
|
||||
|
||||
func (r *rpcClient) codecFunc(contentType string) (codecFunc, error) {
|
||||
if cf, ok := r.opts.codecs[contentType]; ok {
|
||||
return codecWrap(cf), nil
|
||||
|
Loading…
Reference in New Issue
Block a user