Skip to content

refactor: switched to Fetch HTTP client#59

Open
pb-it wants to merge 1 commit intoBenRuns:masterfrom
pb-it:fetch
Open

refactor: switched to Fetch HTTP client#59
pb-it wants to merge 1 commit intoBenRuns:masterfrom
pb-it:fetch

Conversation

@pb-it
Copy link

@pb-it pb-it commented May 16, 2024

Current implementation with request client is using content-type json, which is not supported by BrowserMob Proxy version 2.1.4.

curl -X POST -H "Content-Type: application/json" -d '{port:9090}' http://localhost:8080/proxy

will ignore the data and return the next free port.

Current test cases did not cover the case of sending custom data.

Even though the request client supports sending formdata, the software is deprecated since 2020.
Node has native support for Fetch API (since v18), which from my perspective is a better alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant