code: public void sendRequest(String method, String uri, HeaderList headerList, Body body) throws IOException {
          String value;
  
          output.writeRequestLine(method, uri);
          for (Header header : headerList) {
              output.writeAscii(header.name);
              output.writeAscii(": ");
              value = header.value;
              if (value != null) {
                  output.writeAscii(value);
              }
              output.writeAsciiLn();
          }
          output.writeAsciiLn();
  
          if (body != null) {
              serialize(output, headerList, body);
          }
          output.flush();
      }
docs: --