HTTP Task URL encoding

What is the correct way to encode an URL with multiple query parameters for the HTTP Task?

I have an URL like:

https://api:key-secret@api.mailgun.net/v3/domain/messages?from=sender@test.com&to=test@test.com&subject=Test 2&text=Test message 2&o:tag=account-activation

and like to use it as Request URL. Also, this URL will be very long and may contain HTML in the future. Currently, I’m facing the problem that the process fails to start because of wrong encoding (see topic here).

It’s possible to retrieve the correct encoded URL from Postman when you view the Code of your query and select Java OK HTTP:

image