func NewRequest(toURL *url.URL, opts ...Option) *Request {
	options := &options{
		header: make(http.Header),
	}
	for _, opt := range opts {
		opt(options)
	}
	return &Request{
		URL:    toURL,
		Header: options.header,
	}
}
NewRequest returns a new request.
package transport
import (
	"bytes"
	"context"
	"fmt"
	"io"
	"net/http"
	"net/url"
	"github.com/trustbloc/edge-core/pkg/log"
)
var logger = log.New("activitypub_client")
const (
	AcceptHeader = "Accept"
	LDPlusJSONContentType = `application/ld+json`
	ActivityStreamsContentType = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"`
)
type Signer interface {
	SignRequest(pubKeyID string, req *http.Request) error
}
type httpClient interface {
	Do(req *http.Request) (*http.Response, error)
}
type Transport struct {
	client      httpClient
	getSigner   Signer
	postSigner  Signer
	publicKeyID *url.URL
}
func New(client httpClient, publicKeyID *url.URL, getSigner, postSigner Signer) *Transport {
	return &Transport{
		client:      client,
		publicKeyID: publicKeyID,
		getSigner:   getSigner,
		postSigner:  postSigner,
	}
}
type Request struct {
	URL    *url.URL
	Header http.Header
}
type options struct {
	header http.Header
}
type Option func(options *options)
func WithHeader(name string, values ...string) Option {
	return func(options *options) {
		options.header[name] = values
	}
}