feign

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

*

  • Skip剩余的操作

func (*FeignClientInterceptorChain) Exit

func (*FeignClientInterceptorChain) Next

func (f *FeignClientInterceptorChain) Next(method string, url string, urlValues url.Values, bodyValue interface{}, options ...*RequestOptions) *FeignClient

type RequestOptions

type RequestOptions struct {
	Headers     map[string]string
	ContentType string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL