Subversion Repositories javautils

Rev

Rev 2 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 19
Line 1... Line 1...
1
package de.viathinksoft.utils.http;
1
package de.viathinksoft.utils.http;
2
 
2
 
3
import java.io.IOException;
3
import java.io.IOException;
4
 
4
 
-
 
5
import org.apache.http.Header;
5
import org.apache.http.HttpEntity;
6
import org.apache.http.HttpEntity;
6
import org.apache.http.HttpResponse;
7
import org.apache.http.HttpResponse;
7
import org.apache.http.ParseException;
8
import org.apache.http.ParseException;
8
import org.apache.http.util.EntityUtils;
9
import org.apache.http.util.EntityUtils;
9
 
10
 
Line 36... Line 37...
36
        }
37
        }
37
 
38
 
38
        public int getStatusCode() {
39
        public int getStatusCode() {
39
                return statusCode;
40
                return statusCode;
40
        }
41
        }
-
 
42
       
-
 
43
        public String getHeader(String name) {
-
 
44
                Header[] h = response.getHeaders(name);
-
 
45
                if (h.length != 1) return null;
-
 
46
                return h[0].getValue();
-
 
47
        }
41
}
48
}