Burp Suite User Forum

Create new post

How to make a new HTTP request using the Montoya API

m | Last updated: Dec 25, 2022 07:19AM UTC

Hello. I'd like to request all requests once more with JSON data. There are methods to intercept requests and responses, but there seems to be no methods to build new requests. Also, I made an issue on GitHub. Can I check it? https://github.com/PortSwigger/burp-extensions-montoya-api/issues/17

Hannah, PortSwigger Agent | Last updated: Jan 03, 2023 10:32AM UTC

Hi

You can build a request to pass in using HttpRequest.httpRequest().

To issue your request, you would use Http.issueRequest().

Stephan | Last updated: Jan 18, 2023 02:52PM UTC

That works. However, the JavaDoc states, that httpRequest(httpService, String) and httpRequest(httpService, byte[]) can be used. However, I can only use the String variant.

Hannah, PortSwigger Agent | Last updated: Jan 20, 2023 11:19AM UTC

Hi HttpRequest.httpRequest can take a String or a ByteArray, rather than a byte[]. This is a custom Burp class - you can find it here: https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/core/ByteArray.html

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.