public List buildRequest() {
        List request=new ArrayList<String>();
        
        String params="";
        if(this.method==Method.GET) {
            String data="";
            for(Iterator i=this.getParameters().keySet().iterator();i.hasNext();) {
                String key=(String)i.next();
                data+="&"+key+"="+this.parameters.get(key);
            }
            if(!data.isEmpty()) params="?"+data.substring(1);
        }
        
        request.add(this.getMethod().toString()+" "+this.getResourcePath()+params+" HTTP/1.1");
        request.add("Host: "+this.getHost());
        
        for(Iterator i=this.getHeaders().keySet().iterator();i.hasNext();) {
            String key=(String)i.next();
            request.add(key+": "+getHeaders().get(key));
        }
        
        if(this.isMultipart()) {
            String boundary="---------------------------1298224831751237580694844359";
            int brkCount=2;
            String data="\n";
            for(Iterator i=this.getParameters().keySet().iterator();i.hasNext();) {
                String key=(String)i.next();
                data+=boundary+"\n";
                data+="Content-Disposition: form-data; name=\""+key+"\"\n";
                data+="\n";
                data+=(String)this.getParameters().get(key)+"\n";
                brkCount+=8;
            }
            data+=boundary+"--";
            
            request.add("Content-Type: multipart/form-data; boundary="+boundary);
            request.add("Content-Length: "+(data.length()+brkCount));
            request.add(data);
        } else if(this.method==Method.POST) {
            String data="";
            for(Iterator i=this.getParameters().keySet().iterator();i.hasNext();) {
                String key=(String)i.next();
                data+="&"+key+"="+this.parameters.get(key);
            }
            data=data.substring(1);
            request.add("Content-Length: "+data.length());
            request.add("");
            request.add(data);
        }
        
        return request;
    }