code: protected HttpMethodBase createMethod(String url,HTTPMethod httpMethod)
      {
          if(httpMethod==null)
          {
              throw new FaxException("HTTP method not provided.");
          }
          if((url==null)||(url.length()==0))
          {
              throw new FaxException("HTTP URL not provided.");
          }
          
          //create method
          HttpMethodBase httpMethodClient=null;
          switch(httpMethod)
          {
              case POST:
                  httpMethodClient=new PostMethod(url);
                  break;
              case GET:
                  httpMethodClient=new GetMethod(url);
                  break;
              case PUT:
                  httpMethodClient=new PutMethod(url);
                  break;
          }
  
          return httpMethodClient; 
      }
docs: This function creates and returns a new HTTP method.
  
  @param   url
  The target URL
  @param   httpMethod
  The HTTP method to use
  @return  The new HTTP method