docs: private void setHeaders(XMLHttpRequest xmlHttpRequest) throws RequestException {
  
          if ((headers != null) && (headers.size() > 0)) {
              for (Map.Entry<String, String> header : headers.entrySet()) {
                  try {
                      xmlHttpRequest.setRequestHeader(header.getKey(), header.getValue());
                  } catch (JavaScriptException e) {
                      throw new RequestException(e.getMessage());
                  }
              }
          } else {
              xmlHttpRequest.setRequestHeader("Content-Type", "text/plain; charset=utf-8");
          }
      }