Class HTTPRequest

java.lang.Object
org.cybergarage.http.HTTPPacket
org.cybergarage.http.HTTPRequest
Direct Known Subclasses:
SOAPRequest, SSDPRequest, SubscriptionRequest

public class HTTPRequest extends HTTPPacket
This class rappresnet an HTTP request, and act as HTTP client when it sends the request
Version:
1.8
Author:
Satoshi "skonno" Konno, Stefano "Kismet" Lenzi
  • Constructor Details

    • HTTPRequest

      public HTTPRequest()
    • HTTPRequest

      public HTTPRequest(InputStream in)
    • HTTPRequest

      public HTTPRequest(HTTPSocket httpSock)
  • Method Details

    • setMethod

      public void setMethod(String value)
    • getMethod

      public String getMethod()
    • isMethod

      public boolean isMethod(String method)
    • isGetRequest

      public boolean isGetRequest()
    • isPostRequest

      public boolean isPostRequest()
    • isHeadRequest

      public boolean isHeadRequest()
    • isSubscribeRequest

      public boolean isSubscribeRequest()
    • isUnsubscribeRequest

      public boolean isUnsubscribeRequest()
    • isNotifyRequest

      public boolean isNotifyRequest()
    • setURI

      public void setURI(String value, boolean isCheckRelativeURL)
    • setURI

      public void setURI(String value)
    • getURI

      public String getURI()
    • getParameterList

      public ParameterList getParameterList()
    • getParameterValue

      public String getParameterValue(String name)
    • isSOAPAction

      public boolean isSOAPAction()
    • setRequestHost

      public void setRequestHost(String host)
    • getRequestHost

      public String getRequestHost()
    • setRequestPort

      public void setRequestPort(int host)
    • getRequestPort

      public int getRequestPort()
    • setSocket

      public void setSocket(HTTPSocket value)
    • getSocket

      public HTTPSocket getSocket()
    • getLocalAddress

      public String getLocalAddress()
    • getLocalPort

      public int getLocalPort()
    • parseRequestLine

      public boolean parseRequestLine(String lineStr)
    • getHTTPVersion

      public String getHTTPVersion()
    • getFirstLineString

      public String getFirstLineString()
    • getHeader

      public String getHeader()
    • isKeepAlive

      public boolean isKeepAlive()
    • read

      public boolean read()
    • post

      public boolean post(HTTPResponse httpRes)
    • setBindHost

      public void setBindHost(String host)
      I2P - bind HTTP socket to specified local host address
      Parameters:
      host - null to not bind to a particlar local address
      Since:
      0.9.50
    • post

      public HTTPResponse post(String host, int port, boolean isKeepAlive)
    • post

      public HTTPResponse post(String host, int port)
    • set

      public void set(HTTPRequest httpReq)
    • returnResponse

      public boolean returnResponse(int statusCode)
    • returnOK

      public boolean returnOK()
    • returnBadRequest

      public boolean returnBadRequest()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • print

      public void print()