com.univocity.api.net
Enum RequestMethod

java.lang.Object
  extended by java.lang.Enum<RequestMethod>
      extended by com.univocity.api.net.RequestMethod
All Implemented Interfaces:
Serializable, Comparable<RequestMethod>

public enum RequestMethod
extends Enum<RequestMethod>

The set of HTTP/1.1 methods, plus RFC 5789. Each method type identifies an action to be performed on a the remote resource.

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
HttpRequest, HttpResponse, HttpResponseReader, UrlReaderProvider

Enum Constant Summary
CONNECT
          For use with a proxy that can dynamically switch to being a tunnel (e.g.
DELETE
          Requests to delete the resource identified by the Request-URI.
GET
          Requests to retrieve whatever information is identified by the Request-URI
HEAD
          Identical to GET except that the server must not return a message-body in the response.
OPTIONS
          Represents a request for information about the communication options available on the request/response chain identified by the Request-URI.
PATCH
          Requests that a set of changes, described in the request entity, must be applied to the resource identified by the request’s URI.
POST
          Requests that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line
PUT
          Requests for the entity enclosed in the message to be stored under the supplied Request-URI.
TRACE
          Used to invoke a remote, application-layer loop-back of the request message.
 
Method Summary
 boolean hasBody()
          Checks whether this request method type supports a message body
static RequestMethod valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RequestMethod[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DELETE

public static final RequestMethod DELETE
Requests to delete the resource identified by the Request-URI.


GET

public static final RequestMethod GET
Requests to retrieve whatever information is identified by the Request-URI


PATCH

public static final RequestMethod PATCH
Requests that a set of changes, described in the request entity, must be applied to the resource identified by the request’s URI. This set contains instructions describing how a resource currently residing on the origin server should be modified (as described in RFC 5789).


POST

public static final RequestMethod POST
Requests that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line


PUT

public static final RequestMethod PUT
Requests for the entity enclosed in the message to be stored under the supplied Request-URI.


HEAD

public static final RequestMethod HEAD
Identical to GET except that the server must not return a message-body in the response.


OPTIONS

public static final RequestMethod OPTIONS
Represents a request for information about the communication options available on the request/response chain identified by the Request-URI.


TRACE

public static final RequestMethod TRACE
Used to invoke a remote, application-layer loop-back of the request message. It is expected that the recipient of the message reflects back the message with a 200 (OK) response.


CONNECT

public static final RequestMethod CONNECT
For use with a proxy that can dynamically switch to being a tunnel (e.g. SSL)

Method Detail

values

public static RequestMethod[] 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 (RequestMethod c : RequestMethod.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RequestMethod 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

hasBody

public final boolean hasBody()
Checks whether this request method type supports a message body

Returns:
true if a message body is supported, false otherwise


Copyright © 2018 uniVocity Software Pty Ltd. All rights reserved.