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
-
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
-
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
-
bodyToString
-
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
-
toString
-