Documentation ¶
Overview ¶
Package request Copyright: Copyright (c) 2020<br> Company: 易宝支付(YeePay)<br> @author : yunmei.wu @time : 2023/3/16 3:22 PM
Index ¶
Constants ¶
View Source
const ( SERVER_ROOT = "https://openapi.yeepay.com/yop-center" YOS_SERVER_ROOT = "https://yos.yeepay.com/yop-center" RSA2048 = "RSA2048" YOP_PLATFORM_PUBLIC_KEY = "" /* 392-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PlatformPubKey ¶
type YopRequest ¶
type YopRequest struct { // 服务地址,一般情况无需指定 ServerRoot string RequestId string ApiUri string HttpMethod string AppId string IsvPriKey IsvPriKey // 平台公钥,一般情况无需指定 PlatformPubKey PlatformPubKey // form请求的参数 Params map[string][]string // json请求参数 Content string // 请求头 Headers map[string]string // 文件 Files map[string]*os.File // 超时时间 Timeout time.Duration }
func BuildYopRequest ¶
func BuildYopRequest() *YopRequest
func NewYopRequest ¶
func NewYopRequest(httpMethod string, apiUri string) *YopRequest
NewYopRequest 创建请求
func (*YopRequest) AddParam ¶
func (request *YopRequest) AddParam(name string, value any)
func (*YopRequest) HandleServerRoot ¶
func (request *YopRequest) HandleServerRoot()
Click to show internal directories.
Click to hide internal directories.