func (r *Request) SetHeader(key, value string) *Request {
	r.header.Add(key, value)
	return r
}
SetHeader sets a header on a request with
a `key` and `value`
package api
import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"net/url"
	"github.com/micro/micro/v3/service/logger"
)
type Request struct {
	context   context.Context
	client    *http.Client
	header    http.Header
	params    url.Values
	method    string
	host      string
	namespace string
	resource     string
	resourceName *string
	subResource  *string
	body         io.Reader
	err error
}
type Params struct {
	LabelSelector map[string]string
	Annotations   map[string]string
	Additional    map[string]string
}
func (r *Request) verb(method string) *Request {
	r.method = method
	return r
}
func (r *Request) Context(ctx context.Context) {
	r.context = ctx
}
func (r *Request) Get() *Request {
	return r.verb("GET")
}
func (r *Request) Post() *Request {
	return r.verb("POST")
}
func (r *Request) Put() *Request {
	return r.verb("PUT")
}
func (r *Request) Patch() *Request {
	return r.verb("PATCH")
}
func (r *Request) Delete() *Request {
	return r.verb("DELETE")
}
func (r *Request) Namespace(s string) *Request {
	if len(s) > 0 {
		r.namespace = s
	}
	return r
}
func (r *Request) Resource(s string) *Request {
	r.resource = s
	return r
}
func (r *Request) SubResource(s string) *Request {
	r.subResource = &s
	return r
}
func (r *Request) Name(s string) *Request {
	r.resourceName = &s
	return r
}
func (r *Request) Body(in interface{}) *Request {
	b := new(bytes.Buffer)
	if r.header.Get("Content-Type") != "application/yaml" {
		if err := json.NewEncoder(b).Encode(&in); err != nil {
			r.err = err
			return r
		}
		r.body = b
		return r
	}
	body, ok := in.(io.Reader)
	if !ok {
		r.err = errors.New("invalid data")
		return r
	}
	if _, err := io.Copy(b, body); err != nil {
		r.err = err
		return r
	}
	r.body = b
	return r
}
func (r *Request) Params(p *Params) *Request {
	for k, v := range p.LabelSelector {
		value := fmt.Sprintf("%s=%s", k, v)
		if label := r.params.Get("labelSelector"); len(label) > 0 {
			value = fmt.Sprintf("%s,%s", label, value)
		}
		r.params.Set("labelSelector", value)
	}
	for k, v := range p.Additional {
		r.params.Set(k, v)
	}
	return r
}