/**
 * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.gravitee.common.http;

/**
 * Represents an HTTP method.
 *
 * @author David BRASSELY (brasseld at gmail.com)
 */
public enum HttpMethod {

  CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACE;
}

@@ -726,30 +726,76 @@
 LY (
+david.
 brassel
-d
+y
  at g
-mail.com)
+raviteesource.com)%0A * @author GraviteeSource Team
 %0A */
@@ -834,16 +834,19 @@
 NECT
+(1)
 , DELETE
 , GE
@@ -845,19 +845,28 @@
 LETE
+(2)
 , GET
+(3)
 , HEAD
+(4)
 , OP
@@ -874,33 +874,403 @@
 IONS
+(5)
 , PATCH
+(6)
 , POST
+(7)
 , PUT
+(8)
 , TRACE
-;
+(9);%0A%0A  private int code;%0A%0A  HttpMethod(int code) %7B%0A    this.code = code;%0A  %7D%0A%0A  public int code() %7B%0A    return code;%0A  %7D%0A%0A  public static HttpMethod get(int code) %7B%0A    for(HttpMethod method : HttpMethod.values()) %7B%0A      if (method.code == code) %7B%0A        return method;%0A      %7D%0A    %7D%0A%0A    throw new IllegalArgumentException(%22Invalid HTTP method code%22);%0A  %7D
 %0A%7D%0A

Add code to HTTP method