class HttpPost extends BaseTransform<HttpPostMeta, HttpPostData> implements ITransform<HttpPostMeta, HttpPostData> {

  @VisibleForTesting
  String getRequestBodyParamsAsStr( NameValuePair[] pairs, String charset ) throws HopException {
    StringBuffer buf = new StringBuffer();
    try {
      for ( int i = 0; i < pairs.length; ++i ) {
        NameValuePair pair = pairs[ i ];
        if ( pair.getName() != null ) {
          if ( i > 0 ) {
            buf.append( "&" );
          }

          buf.append( URLEncoder.encode( pair.getName(), !StringUtil.isEmpty( charset ) ? charset : DEFAULT_ENCODING ) );
          buf.append( "=" );
          if ( pair.getValue() != null ) {
            buf.append( URLEncoder.encode( pair.getValue(), !StringUtil.isEmpty( charset ) ? charset : DEFAULT_ENCODING ) );
          }
        }
      }
      return buf.toString();
    } catch ( UnsupportedEncodingException e ) {
      throw new HopException( e.getMessage(), e.getCause() );
    }
  }

  public  HttpPost( TransformMeta transformMeta, HttpPostMeta meta, HttpPostData data,
                   int copyNr, PipelineMeta pipelineMeta, Pipeline pipeline );

}