Package burp.api.montoya.proxy
Interface ProxyHttpRequestResponse
public interface ProxyHttpRequestResponse
HTTP request and response intercepted by the Proxy.
-
Method Summary
Modifier and TypeMethodDescriptionThis method retrieves the annotations for the request/response pair.boolean
Searches the data in the HTTP request and response for the specified search term.boolean
Searches the data in the HTTP request and response for the specified regular expression.boolean
edited()
This method retrieves the HTTP request that was sent by Burp Proxy.boolean
host()
Deprecated, for removal: This API element is subject to removal in a future version.HTTP service for the request.Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
httpService instead.int
Returns the proxy listener port used for the request/response.method()
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
method instead.mimeType()
Obtain the MIME type of the response or request, as determined by Burp Suite.This method retrieves the HTTP response that was received by Burp Proxy.path()
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
path instead.int
port()
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
httpService instead.request()
This method retrieves the HTTP request that was sent by Burp Proxy.Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
body instead.Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
httpVersion instead.response()
This method retrieves the HTTP response that was received by Burp Proxy.boolean
secure()
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
httpService instead.time()
Returns the date and time at which Burp Proxy received the request.Retrieve the timing data associated with this request and response.url()
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
request
HttpRequest request()This method retrieves the HTTP request that was sent by Burp Proxy.- Returns:
- The
HttpRequest
that was sent by Burp Proxy. - See Also:
-
finalRequest
HttpRequest finalRequest()This method retrieves the HTTP request that was sent by Burp Proxy.- Returns:
- The
HttpRequest
that was sent by Burp Proxy.
-
response
HttpResponse response()This method retrieves the HTTP response that was received by Burp Proxy.- Returns:
- The
HttpResponse
that was received by Burp Proxy. - See Also:
-
originalResponse
HttpResponse originalResponse()This method retrieves the HTTP response that was received by Burp Proxy.- Returns:
- The
HttpResponse
that was received by Burp Proxy.
-
annotations
Annotations annotations()This method retrieves the annotations for the request/response pair.- Returns:
- The
Annotations
for the request/response pair.
-
httpService
HttpService httpService()HTTP service for the request.- Returns:
- An
HttpService
object containing details of the HTTP service.
-
url
Deprecated, for removal: This API element is subject to removal in a future version.URL for the issued final request. If the request is malformed, then aMalformedRequestException
is thrown.- Returns:
- The URL in the request.
- Throws:
MalformedRequestException
- if request is malformed.
-
method
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
method instead.HTTP method for the issued final request. If the request is malformed, then aMalformedRequestException
is thrown.- Returns:
- The HTTP method used in the request.
- Throws:
MalformedRequestException
- if request is malformed.
-
path
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
path instead.Path and File for the issued final request. If the request is malformed, then aMalformedRequestException
is thrown.- Returns:
- the path and file in the request
- Throws:
MalformedRequestException
- if request is malformed.
-
host
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
httpService instead.- Returns:
- The hostname or IP address for the service.
-
port
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
httpService instead.- Returns:
- The port number for the service.
-
secure
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
httpService instead.- Returns:
- True is a secure protocol is used for the connection, false otherwise.
-
httpServiceString
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
httpService instead.- Returns:
- The
String
representation of the service.
-
requestHttpVersion
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
httpVersion instead.HTTP Version text parsed from the request line for HTTP 1 messages. HTTP 2 messages will return "HTTP/2"- Returns:
- Version string
-
requestBody
Deprecated, for removal: This API element is subject to removal in a future version.usefinalRequest()
body instead.Body of the issued final request- Returns:
- The body of a message as a
String
.
-
edited
boolean edited()- Returns:
- True if the request or response was edited
-
time
ZonedDateTime time()Returns the date and time at which Burp Proxy received the request.- Returns:
- The time at which Burp Proxy received the request.
-
listenerPort
int listenerPort()Returns the proxy listener port used for the request/response.- Returns:
- the port number used by the proxy listener
-
mimeType
MimeType mimeType()Obtain the MIME type of the response or request, as determined by Burp Suite. If there is no response the mime type will be determined from the request url.- Returns:
- The MIME type.
-
hasResponse
boolean hasResponse()- Returns:
- True if there is a response.
-
contains
Searches the data in the HTTP request and response 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 request and response for the specified regular expression.- Parameters:
pattern
- The regular expression to be searched for.- Returns:
- True if the pattern is matched.
-
timingData
TimingData timingData()Retrieve the timing data associated with this request and response.- Returns:
- The timing data.
-
finalRequest()
httpService instead.