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 */ 018@Deprecated 019public enum HttpMethod { 020 021 /** HTTP GET */ 022 GET(false), 023 024 /** HTTP PUT */ 025 PUT(true), 026 027 /** HTTP POST */ 028 POST(true), 029 030 /** HTTP DELETE */ 031 DELETE(false), 032 033 /** HTTP OPTIONS */ 034 OPTIONS(false), 035 036 /** HTTP HEAD */ 037 HEAD(false), 038 039 /** HTTP TRACE */ 040 TRACE(false), 041 042 /** HTTP CONNECT */ 043 CONNECT(false), 044 045 /** HTTP MOVE */ 046 MOVE(false); 047 048 private boolean hasContent; 049 050 HttpMethod(boolean hasContent) { 051 this.hasContent = hasContent; 052 } 053 054 /** 055 * Returns whether this HTTP method normally has content. 056 * 057 * @return <jk>true</jk> if this HTTP method normally has content. 058 */ 059 public boolean hasContent() { 060 return hasContent; 061 } 062}