Enum Http.Method

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DELETE
      The DELETE method requests that the origin server delete the resource identified by the Request-URI.
      GET
      The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
      HEAD
      The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
      OPTIONS
      The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.
      POST
      The POST method is used to request that the origin server acceptedTypes the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.
      PUT
      The PUT method requests that the enclosed entity be stored under the supplied Request-URI.
      TRACE
      The TRACE method is used to invoke a remote, application-layer loop- back of the request message.
    • Enum Constant Detail

      • OPTIONS

        public static final Http.Method OPTIONS
        The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI. This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.
      • GET

        public static final Http.Method GET
        The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing tryProcess, it is the produced data which shall be returned as the entity in the response and not the source text of the tryProcess, unless that text happens to be the output of the tryProcess.
      • HEAD

        public static final Http.Method HEAD
        The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification.
      • POST

        public static final Http.Method POST
        The POST method is used to request that the origin server acceptedTypes the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI. The posted entity is subordinate to that URI in the same way that a file is subordinate to a directory containing it, a news article is subordinate to a newsgroup to which it is posted, or a record is subordinate to a database.
      • PUT

        public static final Http.Method PUT
        The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URI. If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to indicate successful completion of the request. If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be given that reflects the nature of the problem. The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not understand or implement and MUST return a 501 (Not Implemented) response in such cases.
      • DELETE

        public static final Http.Method DELETE
        The DELETE method requests that the origin server delete the resource identified by the Request-URI. This method MAY be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation has been carried out, even if the status code returned from the origin server indicates that the action has been completed successfully. However, the server SHOULD NOT indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible location.
      • TRACE

        public static final Http.Method TRACE
        The TRACE method is used to invoke a remote, application-layer loop- back of the request message. The final recipient of the request SHOULD reflect the message received back to the client as the entity-body of a 200 (OK) response. The final recipient is either the origin server or the first proxy or gateway to receive a Max-Forwards value of zero (0) in the request (see section 14.31). A TRACE request MUST NOT include an entity.
    • Method Detail

      • values

        public static Http.Method[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Http.Method c : Http.Method.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Http.Method valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null