The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

HTTP Request using Montoya API

Stephan | Last updated: Jan 18, 2023 08:43AM UTC

Hi! I am trying to issue HTTP requests using the Montoya API with Swing Workers. I have a worker, which is supposed to issue two requests (one after another). However, only the first request is sent. My code is as follows: this.requestBuilder = new StringBuilder(); requestBuilder.append("GET ").append(path).append("HTTP/1.1").append(NEWLINE); requestBuilder.append("Host: ").append(host).append(NEWLINE); requestBuilder.append("Connection: close").append(NEWLINE).append(NEWLINE); HttpRequest request = HttpRequest.httpRequest(httpService, requestBuilder.toString()); HttpRequestResponse reqRes = http.sendRequest(request); HttpResponse response = reqRes.response(); return response.toString(); This code is called as follows: BurpHTTPRequest burpReq1 = new BurpHTTPRequest(http, host, path1); String response1 = burpReq1.call(); BurpHTTPRequest burpReq2 = new BurpHTTPRequest(http, host, path2); String response2 = burpReq2.call(); With the old API, this was not an issue. Any ideas? Thanks!

Stephan | Last updated: Jan 18, 2023 09:10AM UTC