httpbatcher

package module
v0.0.0-...-2c9130b Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2016 License: MIT Imports: 9 Imported by: 0

README

httpbatcher

Build Status

A proxy that process multiple http request packed in a single one. Similar to Google batch API and OData.

Build instruction

To build the project just run:

$ go test
$ go build

To run the integration test suite you'll need docker and docker-compose available, and run:

$ docker-compose up -d --build
$ go test ./integration-test --tags integration
$ docker-compose down -v --rmi local

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidMediaType = fmt.Errorf("Expected media type multipart/mixed")

ErrInvalidMediaType is returned when the media type is not multipart/mixed

View Source
var ErrMultipartBoundaryNotDefined = fmt.Errorf("Media type multipart/mixed require boundary parameter")

ErrMultipartBoundaryNotDefined is returned when the media type is not multipart/mixed

Functions

func BuildRequest

func BuildRequest(targetURL string, requests ...*http.Request) (*http.Request, error)

BuildRequest encode a slice of requests into a single, multipart one

func UnpackResponse

func UnpackResponse(fatResponse *http.Response) ([]*http.Response, error)

UnpackResponse decode a multipart response into a slice containing its parts

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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