Package burp.api.montoya.http.message
Interface HttpMessage
- All Known Subinterfaces:
HttpRequest
,HttpRequestToBeSent
,HttpResponse
,HttpResponseReceived
,InterceptedRequest
,InterceptedResponse
public interface HttpMessage
Burp message retrieve common information shared by
HttpRequest
and HttpResponse
.-
Method Summary
Modifier and TypeMethodDescriptionbody()
Body of a message as a byte array.int
Offset within the message where the message body begins.Body of a message as aString
.boolean
Searches the data in the HTTP message for the specified search term.boolean
Searches the data in the HTTP message for the specified regular expression.boolean
hasHeader
(HttpHeader header) boolean
boolean
headers()
HTTP headers contained in the message.headerValue
(String name) HTTP Version text parsed from the request or response line for HTTP 1 messages.markers()
Markers for the message.Message as a byte array.toString()
Message as aString
.
-
Method Details
-
hasHeader
- Parameters:
header
- The header to check if it exists in the request.- Returns:
- True if the header exists in the request.
-
hasHeader
- Parameters:
name
- The name of the header to query within the request.- Returns:
- True if a header exists in the request with the supplied name.
-
hasHeader
- Parameters:
name
- The name of the header to check.value
- The value of the header to check.- Returns:
- True if a header exists in the request that matches the name and value supplied.
-
header
- Parameters:
name
- The name of the header to retrieve.- Returns:
- An instance of
HttpHeader
that matches the name supplied,null
if no match found.
-
headerValue
- Parameters:
name
- The name of the header to retrieve.- Returns:
- The
String
value of the header that matches the name supplied,null
if no match found.
-
headers
List<HttpHeader> headers()HTTP headers contained in the message.- Returns:
- A list of HTTP headers.
-
httpVersion
String httpVersion()HTTP Version text parsed from the request or response line for HTTP 1 messages. HTTP 2 messages will return "HTTP/2"- Returns:
- Version string
-
bodyOffset
int bodyOffset()Offset within the message where the message body begins.- Returns:
- The message body offset.
-
body
ByteArray body()Body of a message as a byte array.- Returns:
- The body of a message as a byte array.
-
bodyToString
String bodyToString()Body of a message as aString
.- Returns:
- The body of a message as a
String
.
-
markers
Markers for the message.- Returns:
- A list of markers.
-
contains
Searches the data in the HTTP message for the specified search term.- Parameters:
searchTerm
- The value to be searched for.caseSensitive
- Flags whether the search is case-sensitive.- Returns:
- True if the search term is found.
-
contains
Searches the data in the HTTP message for the specified regular expression.- Parameters:
pattern
- The regular expression to be searched for.- Returns:
- True if the pattern is matched.
-
toByteArray
ByteArray toByteArray()Message as a byte array.- Returns:
- The message as a byte array.
-
toString
String toString()Message as aString
.
-