func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) {
	reqPath, err := url.Parse(path)
	if err != nil {
		return nil, err
	}
	url := *c.dsn // Make a copy
	url.Path = reqPath.Path
	url.RawQuery = reqPath.RawQuery
	req, err := http.NewRequest(method, url.String(), body)
	if err != nil {
		return nil, err
	}
	return req.WithContext(ctx), nil
}
// NewRequest returns a new *http.Request to the CouchDB server, and the
// specified path. The host, schema, etc, of the specified path are ignored.
NewRequest returns a new *http.Request to the CouchDB server, and the
specified path. The host, schema, etc, of the specified path are ignored.
// NewRequest returns a new * http . Request to the CouchDB server and the // specified path . The host schema etc of the specified path are ignored .
func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) {
	reqPath, err := url.Parse(path)
	if err != nil {
		return nil, err
	}
	url := *c.dsn 
	url.Path = reqPath.Path
	url.RawQuery = reqPath.RawQuery
	req, err := http.NewRequest(method, url.String(), body)
	if err != nil {
		return nil, err
	}
	return req.WithContext(ctx), nil
}
func ( c * Client ) NewRequest ( ctx context . Context , method , path string , body io . Reader ) ( * http . Request , error ) { reqPath , err := url . Parse ( path ) if err != nil { return nil , err } url := * c . dsn url . Path = reqPath . Path url . RawQuery = reqPath . RawQuery req , err := http . NewRequest ( method , url . String ( ) , body ) if err != nil { return nil , err } return req . WithContext ( ctx ) , nil }
NewRequest returns a new *http.Request to the CouchDB server, and the
specified path.
NewRequest returns a new * http . Request to the CouchDB server and the specified path .
// Make a copy