Documentation ¶
Index ¶
- Variables
- func RegisterGlobalFeignClientInterceptor(interceptor FeignClientInterceptor)
- type FeignClient
- func (m *FeignClient) Delete(url string, urlValues url.Values, options ...*RequestOptions) *FeignClient
- func (m *FeignClient) Do(method string, url string, urlValues url.Values, bodyValue interface{}, ...) *FeignClient
- func (m *FeignClient) Fetch(data interface{}) error
- func (m *FeignClient) Get(url string, urlValues url.Values, options ...*RequestOptions) *FeignClient
- func (m *FeignClient) Patch(url string, urlValues url.Values, bodyValue interface{}, ...) *FeignClient
- func (m *FeignClient) Post(url string, urlValues url.Values, bodyValue interface{}, ...) *FeignClient
- func (m *FeignClient) Put(url string, urlValues url.Values, bodyValue interface{}, ...) *FeignClient
- func (m *FeignClient) Raw() ([]byte, error)
- type FeignClientInterceptor
- type FeignClientInterceptorChain
- type RequestOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRequestOptions = RequestOptions{
ContentType: "application/json;charset=UTF-8",
}
Functions ¶
func RegisterGlobalFeignClientInterceptor ¶
func RegisterGlobalFeignClientInterceptor(interceptor FeignClientInterceptor)
Types ¶
type FeignClient ¶
type FeignClient struct { HttpClient *http.Client Interceptors []FeignClientInterceptor Request *http.Request Response *http.Response Error error // contains filtered or unexported fields }
func NewClient ¶
func NewClient() *FeignClient
func (*FeignClient) Delete ¶
func (m *FeignClient) Delete(url string, urlValues url.Values, options ...*RequestOptions) *FeignClient
func (*FeignClient) Do ¶
func (m *FeignClient) Do(method string, url string, urlValues url.Values, bodyValue interface{}, options ...*RequestOptions) *FeignClient
func (*FeignClient) Fetch ¶
func (m *FeignClient) Fetch(data interface{}) error
func (*FeignClient) Get ¶
func (m *FeignClient) Get(url string, urlValues url.Values, options ...*RequestOptions) *FeignClient
func (*FeignClient) Patch ¶
func (m *FeignClient) Patch(url string, urlValues url.Values, bodyValue interface{}, options ...*RequestOptions) *FeignClient
func (*FeignClient) Post ¶
func (m *FeignClient) Post(url string, urlValues url.Values, bodyValue interface{}, options ...*RequestOptions) *FeignClient
func (*FeignClient) Put ¶
func (m *FeignClient) Put(url string, urlValues url.Values, bodyValue interface{}, options ...*RequestOptions) *FeignClient
func (*FeignClient) Raw ¶
func (m *FeignClient) Raw() ([]byte, error)
type FeignClientInterceptor ¶
type FeignClientInterceptor interface {
Do(chain *FeignClientInterceptorChain, method string, url string, urlValues url.Values, bodyValue interface{}, options ...*RequestOptions) *FeignClient
}
type FeignClientInterceptorChain ¶
type FeignClientInterceptorChain struct { *FeignClient // contains filtered or unexported fields }
func (*FeignClientInterceptorChain) Done ¶
func (f *FeignClientInterceptorChain) Done() *FeignClient
*
- Skip剩余的操作
func (*FeignClientInterceptorChain) Exit ¶
func (f *FeignClientInterceptorChain) Exit(err error) *FeignClient
func (*FeignClientInterceptorChain) Next ¶
func (f *FeignClientInterceptorChain) Next(method string, url string, urlValues url.Values, bodyValue interface{}, options ...*RequestOptions) *FeignClient
type RequestOptions ¶
Click to show internal directories.
Click to hide internal directories.