Error: An error occurred while sending the request

Trying to use the Webrequest and having a following error message.

Error: An error occurred while sending the request.
The remote server returned an error: (407) Proxy Authentication Required.
Source: action "Web request", table "Table 1"

In Powershell I use
(New-Object System.Net.WebClient).Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
before Invoke-RestMethod call. Please advise.

Configure proxy settings in the Web Location connector used in the Web Request action:

image