feign

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssembleUrl

func AssembleUrl(service, path string) string

组装

func ConvertServiceToUrl

func ConvertServiceToUrl(address string) string

转换

func Delete

func Delete(url string, headers map[string]string, params ...interface{}) (*httpclient.Response, error)

普通

func DeleteFeign

func DeleteFeign(opt Options, path string, params ...interface{}) (string, error)

获取服务 DELETE

func Get

func Get(url string, headers map[string]string) (*httpclient.Response, error)

普通 GET

func GetFeign

func GetFeign(opt Options, path string) (string, error)

获取服务 GET

func GetServiceAddr

func GetServiceAddr(r registry.Registry, serviceName string) (string, error)

获取服务

func NewClient

func NewClient() *httpclient.HttpClient

func Post

func Post(url string, param url.Values, headers map[string]string) (*httpclient.Response, error)

普通

func PostFeign

func PostFeign(opt Options, path string, param url.Values) (string, error)

获取服务 POST

func PostJson

func PostJson(url string, data interface{}, headers map[string]string) (*httpclient.Response, error)

普通

func PostJsonFeign

func PostJsonFeign(opt Options, path string, data interface{}) (string, error)

获取服务 POSTJSON

func PutJson

func PutJson(url string, data interface{}, headers map[string]string) (*httpclient.Response, error)

普通

func PutJsonFeign

func PutJsonFeign(opt Options, path string, data interface{}) (string, error)

获取服务 PUTJSON

Types

type Option

type Option func(*Options)

type Options

type Options struct {
	Registry registry.Registry
	Service  string
	Headers  map[string]string
}

Jump to

Keyboard shortcuts

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