Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serenity/JS REST should automatically detect proxy configuration #1949

Closed
1 of 3 tasks
jan-molak opened this issue Sep 25, 2023 · 0 comments · Fixed by #1955
Closed
1 of 3 tasks

Serenity/JS REST should automatically detect proxy configuration #1949

jan-molak opened this issue Sep 25, 2023 · 0 comments · Fixed by #1955
Assignees
Labels
developer experience Improvements to the developer experience of using Serenity/JS @serenity-js/rest

Comments

@jan-molak
Copy link
Member

What's the problem you're trying to solve?

Serenity/JS REST relies on Axios, which requires some effort to get it to work behind corporate proxies.

It would be great if the ability to CallAnApi could automatically apply required proxy settings.

How would you like to solve it?

Serenity/JS could use the general approach described in my article, but instead of the tunnel that hasn't been maintained since September 2018, relied on proxy-agents module.

Are there any alternatives?

The alternative is for the developers to configure proxy handling manually when setting up the ability to CallAnApi, but Serenity/JS could provide a better developer experience.

How can we make it happen?

@jan-molak jan-molak self-assigned this Sep 25, 2023
@jan-molak jan-molak changed the title Serenity/JS REST should automatically detedt Serenity/JS REST should automatically detect proxy configuration Sep 25, 2023
jan-molak added a commit that referenced this issue Sep 25, 2023
Configuring Axios to handle proxy servers can be quite a challenge, so Serenity/JS will now do this
automatically for you

Related tickets: closes #1949
@jan-molak jan-molak added the developer experience Improvements to the developer experience of using Serenity/JS label Sep 25, 2023
jan-molak added a commit that referenced this issue Sep 26, 2023
…les for REST interaction

Serenity/JS Playwright Test adapter will now use the `proxy` property defined in Playwright Test
config to override any proxy-related environment variables when instantiating the ability to
CallAnApi. This will allow for consistent behaviour between the browser and the HTTP client.

Related tickets: #1949
jan-molak added a commit that referenced this issue Sep 26, 2023
jan-molak added a commit that referenced this issue Sep 27, 2023
…tect proxy server configuration

Refactored Serenity BDD downloader to use the new ability to CallAnApi and take advantage of
automatic proxy detection based on env variables

Related tickets: #1949
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience Improvements to the developer experience of using Serenity/JS @serenity-js/rest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant