public void postStatus(String content, String idempotencyKey) throws IOException {
    ImmutableMap<String, String> formParams = ImmutableMap.of(
        "status", content,
        // Default everything to private to avoid a privacy incident
        "visibility", "private"
    );
    UrlEncodedContent urlEncodedContent = new UrlEncodedContent(formParams);
    HttpRequest postRequest = TRANSPORT.createRequestFactory()
        .buildPostRequest(
            new GenericUrl(baseUrl + POST_URL),
            urlEncodedContent)
        .setThrowExceptionOnExecuteError(false);
    HttpHeaders headers = new HttpHeaders();
    headers.setAuthorization("Bearer " + accessToken);
    if (!Strings.isNullOrEmpty(idempotencyKey)) {
      // This prevents the same post from being posted twice in the case of network errors
      headers.set("Idempotency-Key", idempotencyKey);
    }
    postRequest.setHeaders(headers);

    HttpResponse response = postRequest.execute();

    validateResponse(postRequest, response, 200);
  }
Posts a new status for the user, initially marked as private.*
extensions/data-transfer/portability-data-transfer-mastodon/src/main/java/org/datatransferproject/transfer/mastodon/social/MastodonHttpUtilities.java