// postJWS signs the body with the given key and POSTs it to the provided url.
// The body argument must be JSON-serializable.
postJWS signs the body with the given key and POSTs it to the provided url.
The body argument must be JSON-serializable.
// postJWS signs the body with the given key and POSTs it to the provided url . // The body argument must be JSON - serializable .
func (c *Client) postJWS(ctx context.Context, key crypto.Signer, url string, body interface{}) (*http.Response, error) {
	nonce, err := c.popNonce(ctx, url)
	if err != nil {
		return nil, err
	}
	b, err := jwsEncodeJSON(body, key, nonce)
	if err != nil {
		return nil, err
	}
	res, err := c.post(ctx, url, "application/jose+json", bytes.NewReader(b))
	if err != nil {
		return nil, err
	}
	c.addNonce(res.Header)
	return res, nil
}
func ( c * Client ) postJWS ( ctx context . Context , key crypto . Signer , url string , body interface { } ) ( * http . Response , error ) { nonce , err := c . popNonce ( ctx , url ) if err != nil { return nil , err } b , err := jwsEncodeJSON ( body , key , nonce ) if err != nil { return nil , err } res , err := c . post ( ctx , url , " " , bytes . NewReader ( b ) ) if err != nil { return nil , err } c . addNonce ( res . Header ) return res , nil }
postJWS signs the body with the given key and POSTs it to the provided url.
postJWS signs the body with the given key and POSTs it to the provided url .