requestclient

package
v0.0.0-...-545971b Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package requestclient provides HTTP request sending using JSON structs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestClient

type RequestClient struct {
	// contains filtered or unexported fields
}

RequestClient is for making HTTP requests.

func New

func New(baseURL string, bearerToken string) *RequestClient

New returns a request client.

func (*RequestClient) Get

func (c *RequestClient) Get(urlSuffix string, returnData interface{}) error

Get makes a GET request.

func (*RequestClient) Post

func (c *RequestClient) Post(urlSuffix string, sendData interface{}, returnData interface{}) error

Post makes a POST request.

Jump to

Keyboard shortcuts

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