httpjrpc

package
v0.0.0-...-5fdd8c6 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClientOption

type HTTPClientOption struct {
	jrpc.EmptyClientOption
	// contains filtered or unexported fields
}

HTTPClientOption is implemented jtpc.ClientOption but do nothing

func WithBasicAuth

func WithBasicAuth(user, password string) *HTTPClientOption

WithBasicAuth is

func WithHTTPClient

func WithHTTPClient(hc *http.Client) *HTTPClientOption

WithHTTPClient is proof: https://play.golang.org/p/RCLHTp-qY80

func WithRoundTripper

func WithRoundTripper(rt http.RoundTripper) *HTTPClientOption

WithRoundTripper option

func WithUserAgent

func WithUserAgent(ua string) *HTTPClientOption

WithUserAgent is

type Repository

type Repository struct {
	*jrpc.Core
}

Repository is

func (*Repository) ServeHTTP

func (r *Repository) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Transport

type Transport struct {
	// contains filtered or unexported fields
}

Transport is

func (*Transport) Close

func (ht *Transport) Close() error

Close is no-op

func (*Transport) ReceivedResponse

func (ht *Transport) ReceivedResponse(_ context.Context) (recv io.ReadCloser, updated, shouldClose bool, err error)

ReceivedResponse is

func (*Transport) SendRequest

func (ht *Transport) SendRequest(ctx context.Context, r io.Reader) error

SendRequest is

Jump to

Keyboard shortcuts

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