io.vertx.core.http

## Class HttpMethod

- java.lang.Object
- - io.vertx.core.http.HttpMethod

-     public class HttpMethod
      extends Object

  Represents an HTTP method.
  Author:
    Tim Fox, Paulo Lopes

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static HttpMethod` | `ACL` The RFC 3744 `ACL` method, this instance is interned and uniquely used.
    `static HttpMethod` | `BASELINE_CONTROL` The RFC 3253 `BASELINE_CONTROL` method, this instance is interned and uniquely used.
    `static HttpMethod` | `CHECKIN` The RFC 3253 `CHECKIN` method, this instance is interned and uniquely used.
    `static HttpMethod` | `CHECKOUT` The RFC 3253 `CHECKOUT` method, this instance is interned and uniquely used.
    `static HttpMethod` | `CONNECT` The RFC 2616 `CONNECT` method, this instance is interned and uniquely used.
    `static HttpMethod` | `COPY` The RFC 2518/4918 `COPY` method, this instance is interned and uniquely used.
    `static HttpMethod` | `DELETE` The RFC 2616 `DELETE` method, this instance is interned and uniquely used.
    `static HttpMethod` | `GET` The RFC 2616 `GET` method, this instance is interned and uniquely used.
    `static HttpMethod` | `HEAD` The RFC 2616 `HEAD` method, this instance is interned and uniquely used.
    `static HttpMethod` | `LABEL` The RFC 3253 `LABEL` method, this instance is interned and uniquely used.
    `static HttpMethod` | `LOCK` The RFC 2518/4918 `LOCK` method, this instance is interned and uniquely used.
    `static HttpMethod` | `MERGE` The RFC 3253 `MERGE` method, this instance is interned and uniquely used.
    `static HttpMethod` | `MKACTIVITY` The RFC 3253 `MKACTIVITY` method, this instance is interned and uniquely used.
    `static HttpMethod` | `MKCALENDAR` The RFC 4791 `MKCALENDAR` method, this instance is interned and uniquely used.
    `static HttpMethod` | `MKCOL` The RFC 2518/4918 `MKCOL` method, this instance is interned and uniquely used.
    `static HttpMethod` | `MKWORKSPACE` The RFC 3253 `MKWORKSPACE` method, this instance is interned and uniquely used.
    `static HttpMethod` | `MOVE` The RFC 2518/4918 `MOVE` method, this instance is interned and uniquely used.
    `static HttpMethod` | `OPTIONS` The RFC 2616 `OPTIONS` method, this instance is interned and uniquely used.
    `static HttpMethod` | `ORDERPATCH` The RFC 3648 `ORDERPATCH` method, this instance is interned and uniquely used.
    `static HttpMethod` | `PATCH` The RFC 5789 `PATCH` method, this instance is interned and uniquely used.
    `static HttpMethod` | `POST` The {RFC 2616 @code POST} method, this instance is interned and uniquely used.
    `static HttpMethod` | `PROPFIND` The RFC 2518/4918 `PROPFIND` method, this instance is interned and uniquely used.
    `static HttpMethod` | `PROPPATCH` The RFC 2518/4918 `PROPPATCH` method, this instance is interned and uniquely used.
    `static HttpMethod` | `PUT` The RFC 2616 `PUT` method, this instance is interned and uniquely used.
    `static HttpMethod` | `REPORT` The RFC 3253 `REPORT` method, this instance is interned and uniquely used.
    `static HttpMethod` | `SEARCH` The RFC 5323 `SEARCH` method, this instance is interned and uniquely used.
    `static HttpMethod` | `TRACE` The RFC 2616 `TRACE` method, this instance is interned and uniquely used.
    `static HttpMethod` | `UNCHECKOUT` The RFC 3253 `UNCHECKOUT` method, this instance is interned and uniquely used.
    `static HttpMethod` | `UNLOCK` The RFC 2518/4918 `UNLOCK` method, this instance is interned and uniquely used.
    `static HttpMethod` | `UPDATE` The RFC 3253 `UPDATE` method, this instance is interned and uniquely used.
    `static HttpMethod` | `VERSION_CONTROL` The RFC 3253 `VERSION_CONTROL` method, this instance is interned and uniquely used.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpMethod(String name)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `static HttpMethod` | `fromNetty(io.netty.handler.codec.http.HttpMethod method)` Lookup the `HttpMethod` value for the specified `nettyMethod`.
    `int` | `hashCode()`
    `String` | `name()`
    `JsonObject` | `toJson()`
    `io.netty.handler.codec.http.HttpMethod` | `toNetty()`
    `String` | `toString()`
    `static HttpMethod` | `valueOf(String value)` Lookup the `HttpMethod` value for the specified `value`.
    `static List<HttpMethod>` | `values()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### OPTIONS

          public static final HttpMethod OPTIONS

      The RFC 2616 `OPTIONS` method, this instance is interned and uniquely used.

    - #### GET

          public static final HttpMethod GET

      The RFC 2616 `GET` method, this instance is interned and uniquely used.

    - #### HEAD

          public static final HttpMethod HEAD

      The RFC 2616 `HEAD` method, this instance is interned and uniquely used.

    - #### POST

          public static final HttpMethod POST

      The {RFC 2616 @code POST} method, this instance is interned and uniquely used.

    - #### PUT

          public static final HttpMethod PUT

      The RFC 2616 `PUT` method, this instance is interned and uniquely used.

    - #### DELETE

          public static final HttpMethod DELETE

      The RFC 2616 `DELETE` method, this instance is interned and uniquely used.

    - #### TRACE

          public static final HttpMethod TRACE

      The RFC 2616 `TRACE` method, this instance is interned and uniquely used.

    - #### CONNECT

          public static final HttpMethod CONNECT

      The RFC 2616 `CONNECT` method, this instance is interned and uniquely used.

    - #### PATCH

          public static final HttpMethod PATCH

      The RFC 5789 `PATCH` method, this instance is interned and uniquely used.

    - #### PROPFIND

          public static final HttpMethod PROPFIND

      The RFC 2518/4918 `PROPFIND` method, this instance is interned and uniquely used.

    - #### PROPPATCH

          public static final HttpMethod PROPPATCH

      The RFC 2518/4918 `PROPPATCH` method, this instance is interned and uniquely used.

    - #### MKCOL

          public static final HttpMethod MKCOL

      The RFC 2518/4918 `MKCOL` method, this instance is interned and uniquely used.

    - #### COPY

          public static final HttpMethod COPY

      The RFC 2518/4918 `COPY` method, this instance is interned and uniquely used.

    - #### MOVE

          public static final HttpMethod MOVE

      The RFC 2518/4918 `MOVE` method, this instance is interned and uniquely used.

    - #### LOCK

          public static final HttpMethod LOCK

      The RFC 2518/4918 `LOCK` method, this instance is interned and uniquely used.

    - #### UNLOCK

          public static final HttpMethod UNLOCK

      The RFC 2518/4918 `UNLOCK` method, this instance is interned and uniquely used.

    - #### MKCALENDAR

          public static final HttpMethod MKCALENDAR

      The RFC 4791 `MKCALENDAR` method, this instance is interned and uniquely used.

    - #### VERSION_CONTROL

          public static final HttpMethod VERSION_CONTROL

      The RFC 3253 `VERSION_CONTROL` method, this instance is interned and uniquely used.

    - #### REPORT

          public static final HttpMethod REPORT

      The RFC 3253 `REPORT` method, this instance is interned and uniquely used.

    - #### CHECKOUT

          public static final HttpMethod CHECKOUT

      The RFC 3253 `CHECKOUT` method, this instance is interned and uniquely used.

    - #### CHECKIN

          public static final HttpMethod CHECKIN

      The RFC 3253 `CHECKIN` method, this instance is interned and uniquely used.

    - #### UNCHECKOUT

          public static final HttpMethod UNCHECKOUT

      The RFC 3253 `UNCHECKOUT` method, this instance is interned and uniquely used.

    - #### MKWORKSPACE

          public static final HttpMethod MKWORKSPACE

      The RFC 3253 `MKWORKSPACE` method, this instance is interned and uniquely used.

    - #### UPDATE

          public static final HttpMethod UPDATE

      The RFC 3253 `UPDATE` method, this instance is interned and uniquely used.

    - #### LABEL

          public static final HttpMethod LABEL

      The RFC 3253 `LABEL` method, this instance is interned and uniquely used.

    - #### MERGE

          public static final HttpMethod MERGE

      The RFC 3253 `MERGE` method, this instance is interned and uniquely used.

    - #### BASELINE_CONTROL

          public static final HttpMethod BASELINE_CONTROL

      The RFC 3253 `BASELINE_CONTROL` method, this instance is interned and uniquely used.

    - #### MKACTIVITY

          public static final HttpMethod MKACTIVITY

      The RFC 3253 `MKACTIVITY` method, this instance is interned and uniquely used.

    - #### ORDERPATCH

          public static final HttpMethod ORDERPATCH

      The RFC 3648 `ORDERPATCH` method, this instance is interned and uniquely used.

    - #### ACL

          public static final HttpMethod ACL

      The RFC 3744 `ACL` method, this instance is interned and uniquely used.

    - #### SEARCH

          public static final HttpMethod SEARCH

      The RFC 5323 `SEARCH` method, this instance is interned and uniquely used.

  - ### Constructor Detail

    - #### HttpMethod

          public HttpMethod(String name)

  - ### Method Detail

    - #### values

          public static List<HttpMethod> values()

      Returns:
        an un-modifiable list of known HTTP methods

    - #### fromNetty

          public static HttpMethod fromNetty(io.netty.handler.codec.http.HttpMethod method)

      Lookup the `HttpMethod` value for the specified `nettyMethod`.
      The predefined method constants `GET`, `POST`, `PUT`, `HEAD`, `OPTIONS`, `DELETE`, `TRACE`, `CONNECT` and `PATCH` are interned and will be returned when case sensitively matching their string value (i.e `"GET"`, etc...)
      Otherwise a new instance is returned.
      Parameters:
        `method` - the netty method
      Returns:
        the `HttpMethod` instance for the specified netty `method`

    - #### valueOf

          public static HttpMethod valueOf(String value)

      Lookup the `HttpMethod` value for the specified `value`.
      The predefined method constants `GET`, `POST`, `PUT`, `HEAD`, `OPTIONS`, `DELETE`, `TRACE`, `CONNECT` and `PATCH` are interned and will be returned when case sensitively matching their string value (i.e `"GET"`, etc...)
      Otherwise a new instance is returned.
      Parameters:
        `value` - the value
      Returns:
        the `HttpMethod` instance for the specified string `value`
      Throws:
        `IllegalArgumentException` - when the value is incorrect, the value is empty or contains an invalid char

    - #### toJson

          public JsonObject toJson()

    - #### name

          public String name()

      Returns:
        the method name

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`
      Returns:
        the same value than `name()`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toNetty

          public io.netty.handler.codec.http.HttpMethod toNetty()

      Returns:
        the wrapped Netty method instance

Copyright © 2022 Eclipse. All rights reserved.