Package com.jprofiler.api.agent
Interface HttpRequest
-
public interface HttpRequestAn object that contains information about the current HTTP-Request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetHeader(java.lang.String name)Returns the value of the specified request header as aString.java.lang.StringgetMethod()Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.java.lang.StringgetQueryString()Returns the query string that is contained in the request URL after the path.java.lang.ObjectgetRequestObject()Returns the technology-specific request object.java.lang.StringgetRequestString()Returns the request URI including the optional query string.java.lang.StringgetRequestURI()Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.
-
-
-
Method Detail
-
getRequestURI
java.lang.String getRequestURI()
Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.This is equivalent to
javax.servlet.http.HttpServletRequest.getRequestURI().- Returns:
- a
Stringcontaining the part of the URL from the protocol name up to the query string
-
getQueryString
java.lang.String getQueryString()
Returns the query string that is contained in the request URL after the path. This method returnsnullif the URL does not have a query string.This is equivalent to
javax.servlet.http.HttpServletRequest.getQueryString().- Returns:
- a
Stringcontaining the query string ornullif the URL contains no query string.
-
getRequestString
java.lang.String getRequestString()
Returns the request URI including the optional query string.- Returns:
- a
Stringcontaining the content ofgetRequestURI()optionally followed by the query string.
-
getMethod
java.lang.String getMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.- Returns:
- a
Stringwith the method name
-
getHeader
java.lang.String getHeader(java.lang.String name)
Returns the value of the specified request header as aString. If the request did not include a header of the specified name, this method returnsnull. If there are multiple headers with the same name, this method returns the first header in the request.Case sensitivity is handled by the technology-specific request object.
This is equivalent to
javax.servlet.http.HttpServletRequest.getHeader().- Parameters:
name- aStringspecifying the header name- Returns:
- a
Stringcontaining the value of the requested header, ornullif the request does not have a header of that name
-
getRequestObject
java.lang.Object getRequestObject()
Returns the technology-specific request object.- Returns:
- For servlet containers, a
javax.servlet.http.HttpServletRequest, for Netty-HTTP/1 aio.netty.handler.codec.http.HttpRequest, for Netty-HTTP/2 aio.netty.handler.codec.http2.Http2Headersobject
-
-