json

package
v0.73.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package json provides helper functions to handle requests and responses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromResponse

func FromResponse(ctx context.Context, rsp *http.Response, payload interface{}) error

FromResponse checks for valid headers and decodes the payload.

func NewRequest

func NewRequest(ctx context.Context, method string, url string, payload interface{}) (*http.Request, error)

NewRequest creates a request, encodes the body, and sets the appropriate headers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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