code: protected <T> T doPost(String path, MultivaluedMap<String, String> formParams, Class<T> cls, MultivaluedMap<String, String> headers) throws ClientException {
          this.readLock.lock();
          try {
              WebResource.Builder requestBuilder = getResourceWrapper().rewritten(path, HttpMethod.POST).getRequestBuilder();
              ensurePostFormHeaders(headers, requestBuilder, true, true);
              ClientResponse response = requestBuilder.post(ClientResponse.class, formParams);
              errorIfStatusNotEqualTo(response, ClientResponse.Status.OK);
              return response.getEntity(cls);
          } catch (ClientHandlerException ex) {
              throw new ClientException(ClientResponse.Status.INTERNAL_SERVER_ERROR, ex.getMessage());
          } finally {
              this.readLock.unlock();
          }
      }
docs: Submits a form and gets back a JSON object.
  
  @param <T> the type of the object that is expected in the response.
  @param path the API to call.
  @param formParams the form parameters to send.
  @param cls the type of object that is expected in the response.
  @param headers any headers. If there is no Accepts header, an Accepts
  header is added for JSON. If there is no Content Type header, a Content
  Type header is added for forms.
  @return the object in the response.
  
  @throws ClientException if a status code other than 200 (OK) is returned.