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

Sending Request Montoya

Phil | Last updated: Jun 03, 2023 12:39PM UTC

I'm trying to send a request with the following code, but getting -1. What's wrong with this workflow? TIA! HttpRequestResponse ret = api.http().sendRequest(HttpRequest.httpRequestFromUrl("https://google.com")); api.logging().logToOutput(String.valueOf(ret.statusCode()));

Hannah, PortSwigger Agent | Last updated: Jun 05, 2023 03:46PM UTC

Hi Do you have connectivity to the endpoint that you are making your request to? If you send a request to "https://google.com" from Repeater, do you receive a valid response back? You can quickly generate a request to an endpoint by copying the URL into your clipboard, then in Repeater, right-clicking and using "Paste URL as request".

Phil | Last updated: Jun 07, 2023 12:29PM UTC

Thank you for stating the obvious. I did NOT have connectivity to the requested URL. I had my proxy settings enabled and had forgotten. The above code works just fine.

Hannah, PortSwigger Agent | Last updated: Jun 07, 2023 12:58PM UTC