http

package
v0.0.0-...-ebf99ae Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Do

type Do struct {
	Client *http.Client
}

Do will execute incoming http.Request message.

func (Do) T

func (d Do) T(in <-chan interface{}, out chan<- interface{}, errs chan<- error)

T implements the Tfunc interface

Example
l.New().SetP(func(out chan<- interface{}, errs chan<- error) {
	req, err := http.NewRequest("GET", "https://google.com", nil)
	if err != nil {
		errs <- err
	} else {
		out <- req
		out <- req
	}
}).Add(
	Do{}.T,
	l.I(func(m interface{}) (interface{}, error) {
		return m.(*http.Response).Status, nil
	}),
	l.Stdout,
).Run()
Output:

200 OK
200 OK

Jump to

Keyboard shortcuts

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