Class HttpMethod


  • public class HttpMethod
    extends java.lang.Object
    HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. Although they can also be nouns, these request methods are sometimes referred to as HTTP verbs. Each of them implements a different semantic, but some common features are shared by a group of them: e.g. a request method can be safe, idempotent, or cacheable.
    See Also:
    HTTP methods
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONNECT
      The CONNECT method establishes a tunnel to the server identified by the target resource.
      static java.lang.String DELETE
      The DELETE method deletes the specified resource.
      static java.lang.String GET
      The HTTP GET method requests a representation of the specified resource.
      static java.lang.String HEAD
      The HTTP HEAD method requests the headers that would be returned if the HEAD request's URL was instead requested with the HTTP GET method.
      static java.lang.String OPTIONS
      The OPTIONS method describes the communication options for the target resource.
      static java.lang.String PATCH
      The PATCH method applies partial modifications to a resource.
      static java.lang.String POST
      The HTTP POST method sends data to the server.
      static java.lang.String PUT
      The PUT method replaces all current representations of the target resource with the request payload.
      static java.lang.String TRACE
      The TRACE method performs a message loop-back test along the path to the target resource.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GET

        public static final java.lang.String GET
        The HTTP GET method requests a representation of the specified resource. Requests using GET should only be used to request data (they shouldn't include data).
        See Also:
        Constant Field Values
      • HEAD

        public static final java.lang.String HEAD
        The HTTP HEAD method requests the headers that would be returned if the HEAD request's URL was instead requested with the HTTP GET method. For example, if a URL might produce a large download, a HEAD request could read its Content-Length header to check the filesize without actually downloading the file.

        Warning: A response to a HEAD method should not have a body. If it has one anyway, that body must be ignored: any representation headers that might describe the erroneous body are instead assumed to describe the response which a similar GET request would have received.
        See Also:
        Constant Field Values
      • POST

        public static final java.lang.String POST
        The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.

        The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side effect), where successive identical POST may have additional effects, like passing an order several times.
        See Also:
        POST, Constant Field Values
      • PUT

        public static final java.lang.String PUT
        The PUT method replaces all current representations of the target resource with the request payload.
        See Also:
        PUT, Constant Field Values
      • DELETE

        public static final java.lang.String DELETE
        The DELETE method deletes the specified resource.
        See Also:
        DELETE, Constant Field Values
      • CONNECT

        public static final java.lang.String CONNECT
        The CONNECT method establishes a tunnel to the server identified by the target resource.
        See Also:
        CONNECT, Constant Field Values
      • OPTIONS

        public static final java.lang.String OPTIONS
        The OPTIONS method describes the communication options for the target resource.
        See Also:
        OPTIONS, Constant Field Values
      • TRACE

        public static final java.lang.String TRACE
        The TRACE method performs a message loop-back test along the path to the target resource.
        See Also:
        TRACE, Constant Field Values
      • PATCH

        public static final java.lang.String PATCH
        The PATCH method applies partial modifications to a resource.
        See Also:
        PATCH, Constant Field Values