func (c *Client) Revoke(req *api.RevokeRequest, tr http.RoundTripper) (*api.RevokeResponse, error) {
	var retried bool
	body, err := json.Marshal(req)
	if err != nil {
		return nil, errors.Wrap(err, "error marshaling request")
	}
	var client *uaClient
retry:
	if tr != nil {
		client = newClient(tr)
	} else {
		client = c.client
	}

	u := c.endpoint.ResolveReference(&url.URL{Path: "/revoke"})
	resp, err := client.Post(u.String(), "application/json", bytes.NewReader(body))
	if err != nil {
		return nil, errors.Wrapf(err, "client POST %s failed", u)
	}
	if resp.StatusCode >= 400 {
		if !retried && c.retryOnError(resp) {
			retried = true
			goto retry
		}
		return nil, readError(resp.Body)
	}
	var revoke api.RevokeResponse
	if err := readJSON(resp.Body, &revoke); err != nil {
		return nil, errors.Wrapf(err, "error reading %s", u)
	}
	return &revoke, nil
}
// Revoke performs the revoke request to the CA and returns the api.RevokeResponse
// struct.
Revoke performs the revoke request to the CA and returns the api.RevokeResponse
struct.
// Revoke performs the revoke request to the CA and returns the api . RevokeResponse // struct .
func (c *Client) Revoke(req *api.RevokeRequest, tr http.RoundTripper) (*api.RevokeResponse, error) {
	var retried bool
	body, err := json.Marshal(req)
	if err != nil {
		return nil, errors.Wrap(err, "error marshaling request")
	}
	var client *uaClient
retry:
	if tr != nil {
		client = newClient(tr)
	} else {
		client = c.client
	}
	u := c.endpoint.ResolveReference(&url.URL{Path: "/revoke"})
	resp, err := client.Post(u.String(), "application/json", bytes.NewReader(body))
	if err != nil {
		return nil, errors.Wrapf(err, "client POST %s failed", u)
	}
	if resp.StatusCode >= 400 {
		if !retried && c.retryOnError(resp) {
			retried = true
			goto retry
		}
		return nil, readError(resp.Body)
	}
	var revoke api.RevokeResponse
	if err := readJSON(resp.Body, &revoke); err != nil {
		return nil, errors.Wrapf(err, "error reading %s", u)
	}
	return &revoke, nil
}
func ( c * Client ) Revoke ( req * api . RevokeRequest , tr http . RoundTripper ) ( * api . RevokeResponse , error ) { var retried bool body , err := json . Marshal ( req ) if err != nil { return nil , errors . Wrap ( err , " " ) } var client * uaClient retry : if tr != nil { client = newClient ( tr ) } else { client = c . client } u := c . endpoint . ResolveReference ( & url . URL { Path : " " } ) resp , err := client . Post ( u . String ( ) , " " , bytes . NewReader ( body ) ) if err != nil { return nil , errors . Wrapf ( err , " " , u ) } if resp . StatusCode >= 400 { if ! retried && c . retryOnError ( resp ) { retried = true goto retry } return nil , readError ( resp . Body ) } var revoke api . RevokeResponse if err := readJSON ( resp . Body , & revoke ) ; err != nil { return nil , errors . Wrapf ( err , " " , u ) } return & revoke , nil }
Revoke performs the revoke request to the CA and returns the api.RevokeResponse
struct.
Revoke performs the revoke request to the CA and returns the api . RevokeResponse struct .