code: public static int post(String apiKey, String jsonPayload) {
      try {
        if (validateApiKey(apiKey)) {
          URL endpoint = new URL(RaygunSettings.getCrashReportingEndpoint());
          HttpURLConnection connection = (HttpURLConnection) endpoint.openConnection();
  
          try {
            connection.setRequestMethod("POST");
            connection.setRequestProperty("X-ApiKey", apiKey);
            connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
  
            OutputStream outputStream = connection.getOutputStream();
            outputStream.write(jsonPayload.toString().getBytes("UTF-8"));
            outputStream.close();
  
            int responseCode = connection.getResponseCode();
            RaygunLogger.d("Exception message HTTP POST result: " + responseCode);
  
            return responseCode;
          }
          finally {
            if (connection != null) {
              connection.disconnect();
            }
          }
        }
      }
      catch (Exception e) {
        RaygunLogger.e("Couldn't post exception - " + e.getMessage());
        e.printStackTrace();
      }
      return -1;
    }
docs: Raw post method that delivers a pre-built RaygunMessage to the Raygun API. You do not need to call this method
  directly unless you want to manually build your own message - for most purposes you should call Send().
  @param apiKey The API key of the app to deliver to
  @param jsonPayload The JSON representation of a RaygunMessage to be delivered over HTTPS.
  @return HTTP result code - 202 if successful, 403 if API key invalid, 400 if bad message (invalid properties)