docs: @SuppressWarnings("unchecked")
      public static void handleStandardPost(EntityEnclosingMethod methodProxyRequest,
                                            HttpServletRequest httpServletRequest,
                                            History history) throws Exception {
          String deserialisedMessages = "";
          byte[] requestByteArray = null;
          // Create a new StringBuffer with the data to be passed
          StringBuilder requestBody = new StringBuilder();
          InputStream body = httpServletRequest.getInputStream();
          RequestEntity requestEntity = null;
  
          if (httpServletRequest.getContentType() != null &&
              httpServletRequest.getContentType().contains(STRING_CONTENT_TYPE_FORM_URLENCODED)
              && httpServletRequest.getHeader("content-encoding") == null) {
              requestByteArray = IOUtils.toByteArray(body);
              history.setRawPostData(requestByteArray);
  
              // this is binary.. just return it as is
              requestEntity = new ByteArrayRequestEntity(requestByteArray);
  
              // Get the client POST data as a Map if content type is: application/x-www-form-urlencoded
              // We do this manually since some data is not properly parseable by the servlet request
              Map<String, String[]> mapPostParameters = HttpUtilities.mapUrlEncodedParameters(requestByteArray);
  
              // Iterate the parameter names
              for (String stringParameterName : mapPostParameters.keySet()) {
                  // Iterate the values for each parameter name
                  String[] stringArrayParameterValues = mapPostParameters
                      .get(stringParameterName);
                  for (String stringParameterValue : stringArrayParameterValues) {
                      // Create a NameValuePair and store in list
  
                      // add an & if there is already data
                      if (requestBody.length() > 0) {
                          requestBody.append("&");
                      }
  
                      requestBody.append(stringParameterName);
  
                      // not everything has a value so lets check
                      if (stringParameterValue.length() > 0) {
                          requestBody.append("=");
                          requestBody.append(stringParameterValue);
                      }
                  }
              }
              /**
               * Process the post data string so it can be added to history
               * Separates individual params out and applies post data override as applicable
               */
              Proxy.QueryInformation queryInformation = Proxy.processPostDataString(requestBody.toString());
              // Set request body which is added to history
              requestBody = new StringBuilder(queryInformation.queryString);
              // Rewrite the post data if it is modified
              if (queryInformation.modified) {
                  String postData = queryInformation.queryString;
                  requestBody = new StringBuilder(postData);
                  requestByteArray = postData.getBytes();
                  requestEntity = new ByteArrayRequestEntity(requestByteArray);
              }
          } else if (httpServletRequest.getContentType() != null &&
              httpServletRequest.getContentType().contains(STRING_CONTENT_TYPE_MESSAGEPACK)) {
  
              /**
               * Convert input stream to bytes for it to be read by the deserializer
               * Unpack and iterate the list to see the contents
               */
              requestByteArray = IOUtils.toByteArray(body);
              history.setRawPostData(requestByteArray);
              requestEntity = new ByteArrayRequestEntity(requestByteArray);
              ByteArrayInputStream byteArrayIS = new ByteArrayInputStream(requestByteArray);
              MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(byteArrayIS);
  
              while (unpacker.hasNext()) {
                  ImmutableValue message = unpacker.unpackValue();
                  deserialisedMessages += message;
                  deserialisedMessages += "\n";
              }
  
              history.setRequestBodyDecoded(true);
              requestBody = new StringBuilder(Proxy.processPostDataString(requestBody.toString()).queryString);
          } else {
              requestByteArray = IOUtils.toByteArray(body);
              history.setRawPostData(requestByteArray);
  
              // this is binary.. just return it as is
              requestEntity = new ByteArrayRequestEntity(requestByteArray);
  
              // decode this for history if it is encoded
              String requestBodyString = PluginHelper.getByteArrayDataAsString(httpServletRequest.getHeader("content-encoding"), requestByteArray);
              requestBody.append(requestBodyString);
  
              // mark in history if the body has been decoded
              if (!requestBodyString.equals(new String(requestByteArray))) {
                  history.setRequestBodyDecoded(true);
              }
              requestBody = new StringBuilder(Proxy.processPostDataString(requestBody.toString()).queryString);
          }
  
          // set post body in history object
          history.setRequestPostData(requestBody.toString());
  
          // set post body in proxy request object
          methodProxyRequest.setRequestEntity(requestEntity);
  
          /**
           * Set the history to have decoded messagepack. Pass the byte data back to request
           */
          if (httpServletRequest.getContentType() != null &&
              httpServletRequest.getContentType().contains(STRING_CONTENT_TYPE_MESSAGEPACK)) {
              history.setRequestPostData(deserialisedMessages);
              ByteArrayRequestEntity byteRequestEntity = new ByteArrayRequestEntity(requestByteArray);
              methodProxyRequest.setRequestEntity(byteRequestEntity);
          }
      }