util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuthentication

func BasicAuthentication(r *http.Request) (string, string, error)

BasicAuthentication extracts credentials from an HTTP Authorization header

func HTTPPostWithFormData

func HTTPPostWithFormData(api, resource, username, password, clientVersion, appOS, osVersion string) string

HTTPPostWithFormData sends an HTTP POST request with form data

func JSONToStruct

func JSONToStruct(j string, v interface{}) error

JSONToStruct unmarshals JSON to interface

func SendJSONResponse

func SendJSONResponse(w http.ResponseWriter, v interface{})

SendJSONResponse sends an HTTP response with JSON content

func XMLToStruct

func XMLToStruct(x string, v interface{}) error

XMLToStruct unmarshals XML to interface

Types

This section is empty.

Jump to

Keyboard shortcuts

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