http

package
v1.6.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RetryWaitMax = 120 * time.Second
	RetryMax     = 60
)
View Source
const (
	// SCRestAPIPrefix represents base URL path to execute smart contract rest points.
	SCRestAPIPrefix      = "v1/screst/"
	SmartContractAddress = `6dba10422e368813802877a85039d3985d96760ed844092319743fb3a76712d7`
	RestPrefix           = SCRestAPIPrefix + SmartContractAddress
	GetAuthorizersPath   = "/getAuthorizerNodes"
)

Variables

This section is empty.

Functions

func MakeSCRestAPICall

func MakeSCRestAPICall(relativePath string, params map[string]string) ([]byte, error)

MakeSCRestAPICall calls smart contract with provided address and makes retryable request to smart contract resource with provided relative path using params.

func NewClient

func NewClient() *http.Client

NewClient creates default http.Client with timeouts.

func NewRetryableClient

func NewRetryableClient() *retryablehttp.Client

NewRetryableClient creates default retryablehttp.Client with timeouts and embedded NewClient result.

Types

This section is empty.

Jump to

Keyboard shortcuts

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