api-server: github.com/DevMine/api-server/util/httputil Index | Files

package httputil

import "github.com/DevMine/api-server/util/httputil"

Package httputil provides utilities useful when dealing with http responses.

Index

Package Files

httputil.go

type ResponseError Uses

type ResponseError struct {
    // Message shall be an informative message about the error.
    Message string `json:"message"`
}

ResponseError shall be used when an error response shall be returned.

func NewResponseError Uses

func NewResponseError(msg string) *ResponseError

NewResponseError creates a new ResponseError.

func (*ResponseError) JSON Uses

func (re *ResponseError) JSON() string

JSON formats a ResponseError to JSON.

Package httputil imports 1 packages (graph) and is imported by 2 packages. Updated 2016-07-21. Refresh now. Tools for package owners.