Search in sources :

Example 11 with BasicRequestLine

use of org.apache.http.message.BasicRequestLine in project platform_external_apache-http by android.

the class HttpRequestBase method getRequestLine.

public RequestLine getRequestLine() {
    String method = getMethod();
    ProtocolVersion ver = getProtocolVersion();
    URI uri = getURI();
    String uritext = null;
    if (uri != null) {
        uritext = uri.toASCIIString();
    }
    if (uritext == null || uritext.length() == 0) {
        uritext = "/";
    }
    return new BasicRequestLine(method, uritext, ver);
}
Also used : BasicRequestLine(org.apache.http.message.BasicRequestLine) ProtocolVersion(org.apache.http.ProtocolVersion) URI(java.net.URI)

Aggregations

BasicRequestLine (org.apache.http.message.BasicRequestLine)11 ProtocolVersion (org.apache.http.ProtocolVersion)9 HttpHost (org.apache.http.HttpHost)5 RequestLine (org.apache.http.RequestLine)5 URI (java.net.URI)3 HttpResponse (org.apache.http.HttpResponse)3 StatusLine (org.apache.http.StatusLine)3 BasicHttpResponse (org.apache.http.message.BasicHttpResponse)3 BasicStatusLine (org.apache.http.message.BasicStatusLine)3 HttpEntity (org.apache.http.HttpEntity)2 CloseableHttpResponse (org.apache.http.client.methods.CloseableHttpResponse)2 HttpClientContext (org.apache.http.client.protocol.HttpClientContext)2 BasicHttpEntityEnclosingRequest (org.apache.http.message.BasicHttpEntityEnclosingRequest)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 IOException (java.io.IOException)1 UncheckedIOException (java.io.UncheckedIOException)1 ConnectException (java.net.ConnectException)1 SocketTimeoutException (java.net.SocketTimeoutException)1 GeneralSecurityException (java.security.GeneralSecurityException)1 ConnectionPoolTimeoutException (org.apache.http.conn.ConnectionPoolTimeoutException)1