Class 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 Detail

      • HTTPRequest

        public HTTPRequest()
      • HTTPRequest

        public HTTPRequest​(HTTPSocket httpSock)
    • Method Detail

      • 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()
      • 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)
      • 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()
      • 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
      • returnResponse

        public boolean returnResponse​(int statusCode)
      • returnOK

        public boolean returnOK()
      • returnBadRequest

        public boolean returnBadRequest()
      • print

        public void print()