001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.http; 018 019/** 020 * The first line of an HTTP request message, containing the method, request URI, and protocol version. 021 * 022 * <p> 023 * Mirrors the semantics of {@code org.apache.http.RequestLine} without the Apache HttpCore dependency. 024 * The default immutable implementation is {@link org.apache.juneau.http.request.HttpRequestLineBean}. 025 * 026 * <h5 class='section'>See Also:</h5><ul> 027 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/NextGenRestClient">Next-Generation REST Client</a> 028 * </ul> 029 * 030 * @since 10.0.0 031 */ 032public interface HttpRequestLine { 033 034 /** 035 * Returns the request method (e.g. {@code "GET"}, {@code "POST"}). 036 * 037 * @return The method name. Never <jk>null</jk>. 038 */ 039 String getMethod(); 040 041 /** 042 * Returns the request URI (e.g. {@code "/users/123?verbose=true"}). 043 * 044 * @return The URI. Never <jk>null</jk>. 045 */ 046 String getUri(); 047 048 /** 049 * Returns the HTTP protocol version (e.g. {@link HttpProtocolVersion#HTTP_1_1}). 050 * 051 * @return The protocol version. Never <jk>null</jk>. 052 */ 053 HttpProtocolVersion getProtocolVersion(); 054}