decode

package
Version: v0.0.0-...-7e08fcf Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: MIT Imports: 7 Imported by: 0

README

decode

import "github.com/timehop/nimbus-openrtb/go/decode"

Overview

Index

Package files

request.go response.go

func RequestToStruct

func RequestToStruct(res *http.Request, v interface{}) error

RequestToStruct takes the a request generically, checks the Content-Encoding and unmarshals the object to the provided data structure

func ResponseToStruct

func ResponseToStruct(res *http.Response, v interface{}) error

ResponseToStruct takes the response generically, checks the Content-Encoding and unmarshals the object to the provided data structure


Generated by godoc2md

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestToStruct

func RequestToStruct(res *http.Request, v interface{}) error

RequestToStruct takes the a request generically, checks the Content-Encoding and unmarshals the object to the provided data structure

func ResponseToBytes

func ResponseToBytes(res *http.Response) ([]byte, error)

ResponseToBytes takes the Nimbus response, decodes if neccasary and returns the body as bytes if the Content-Encoding header is missing this can silently fail

func ResponseToStruct

func ResponseToStruct(res *http.Response, v interface{}) error

ResponseToStruct takes the response generically, checks the Content-Encoding and unmarshals the object to the provided data structure

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL