func (p *HTTP) request(body ...string) ([]byte, error) {
	var b io.Reader
	if len(body) == 1 {
		b = strings.NewReader(body[0])
	}

	// empty method becomes GET
	req, err := request.New(strings.ToUpper(p.method), p.url, b, p.headers)
	if err != nil {
		return []byte{}, err
	}

	return p.DoBody(req)
}
// request executed the configured request
request executed the configured request
// request executed the configured request
func (p *HTTP) request(body ...string) ([]byte, error) {
	var b io.Reader
	if len(body) == 1 {
		b = strings.NewReader(body[0])
	}
	req, err := request.New(strings.ToUpper(p.method), p.url, b, p.headers)
	if err != nil {
		return []byte{}, err
	}
	return p.DoBody(req)
}
func ( p * HTTP ) request ( body ... string ) ( [ ] byte , error ) { var b io . Reader if len ( body ) == 1 { b = strings . NewReader ( body [ 0 ] ) } req , err := request . New ( strings . ToUpper ( p . method ) , p . url , b , p . headers ) if err != nil { return [ ] byte { } , err } return p . DoBody ( req ) }
request executed the configured request
request executed the configured request
// empty method becomes GET