requests

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

View Source
const TIMEOUT = 10

TIMEOUT ... client timeout

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Key    string
	Secret string
}

Auth holds the values required to authenticate the requests made to Razorpay APIs

type FileUploadParams added in v1.2.0

type FileUploadParams struct {
	File   *os.File
	Fields map[string]string
}

type Request

type Request struct {
	Auth       Auth
	HTTPClient *http.Client
	Headers    map[string]string
	Version    string
	SDKName    string
	AppDetails map[string]string
	BaseURL    string
}

Request encapsulates all the information required to make an HTTP request to Razorpay's APIs.

func (*Request) AddHeaders

func (request *Request) AddHeaders(headers map[string]string)

AddHeaders adds header to the Request object

func (*Request) Delete

func (request *Request) Delete(path string, queryParams map[string]interface{}, extraHeaders map[string]string) (map[string]interface{}, error)

Delete ...

func (*Request) File added in v1.2.0

func (request *Request) File(path string, params FileUploadParams, extraHeaders map[string]string) (map[string]interface{}, error)

func (*Request) Get

func (request *Request) Get(path string, queryParams map[string]interface{}, extraHeaders map[string]string) (map[string]interface{}, error)

Get ...

func (*Request) Patch

func (request *Request) Patch(path string, payload map[string]interface{}, extraHeaders map[string]string) (map[string]interface{}, error)

Patch ...

func (*Request) Post

func (request *Request) Post(path string, payload map[string]interface{}, extraHeaders map[string]string) (map[string]interface{}, error)

Post ...

func (*Request) Put

func (request *Request) Put(path string, payload map[string]interface{}, extraHeaders map[string]string) (map[string]interface{}, error)

Put ...

func (*Request) SetTimeout

func (request *Request) SetTimeout(timeout int16)

SetTimeout ...

Jump to

Keyboard shortcuts

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