001// ***************************************************************************************************************************
002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
003// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
005// * with the License.  You may obtain a copy of the License at                                                              *
006// *                                                                                                                         *
007// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
008// *                                                                                                                         *
009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
011// * specific language governing permissions and limitations under the License.                                              *
012// ***************************************************************************************************************************
013package org.apache.juneau.rest.client;
014
015/**
016 * Enumeration of HTTP methods.
017 */
018public enum HttpMethod {
019
020   /** HTTP GET */
021   GET(false),
022
023   /** HTTP PUT */
024   PUT(true),
025
026   /** HTTP POST */
027   POST(true),
028
029   /** HTTP DELETE */
030   DELETE(false),
031
032   /** HTTP OPTIONS */
033   OPTIONS(false),
034
035   /** HTTP HEAD */
036   HEAD(false),
037
038   /** HTTP TRACE */
039   TRACE(false),
040
041   /** HTTP CONNECT */
042   CONNECT(false),
043
044   /** HTTP MOVE */
045   MOVE(false);
046
047   private boolean hasContent;
048
049   HttpMethod(boolean hasContent) {
050      this.hasContent = hasContent;
051   }
052
053   /**
054    * Returns whether this HTTP method normally has content.
055    *
056    * @return <jk>true</jk> if this HTTP method normally has content.
057    */
058   public boolean hasContent() {
059      return hasContent;
060   }
061}