title: How to serialize a request?
body: <p>I have the request below, if occurs an error at the service I'd like to save in a database the request serialized to send again in other moment. </p>
  
  <pre><code>        URI uri = fromUri(config.getUri()).path("/myservice").build();
          Client client = ClientProducer.get();
  
          response = client
                  .target(uri)
                  .request()
                  .headers(obterCabecalhos())
                  .accept(MediaType.APPLICATION_JSON)
                  .post(Entity.json(myEntity));
  
          if (response.getStatus() != OK.getStatusCode()) {
              throw new TSEIntegracaoException();
               // Here I'd like to serialize the request and save in a database
          }
  </code></pre>