request

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

README

request

import "github.com/coralproject/shelf/internal/platform/request"

Overview

Index

Package files

request.go

type Client

type Client struct {
    BaseURL string
    Signer  auth.Signer
}

Client contains the necessary pieces to perform requests down to a service layer that has platform authentication enabled.

func (*Client) Do
func (c *Client) Do(req *http.Request) ([]byte, error)

Do executes the http request on the default http client and returns the bytes in the event that the response code was < 400.

func (*Client) New
func (c *Client) New(context interface{}, verb, path string, body io.Reader) (*http.Request, error)

New creates a new request sourced from the client. If a signer is present on the client, requests will automatically be signed.


Generated by godoc2md

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL string
	Signer  auth.Signer
}

Client contains the necessary pieces to perform requests down to a service layer that has platform authentication enabled.

func (*Client) Do

func (c *Client) Do(req *http.Request) ([]byte, error)

Do executes the http request on the default http client and returns the bytes in the event that the response code was < 400.

func (*Client) New

func (c *Client) New(context interface{}, verb, path string, body io.Reader) (*http.Request, error)

New creates a new request sourced from the client. If a signer is present on the client, requests will automatically be signed.

Jump to

Keyboard shortcuts

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