Skip to content
Advertisement

How to add a full URL as an endpoint to a GET request

I’m trying to make a GET request and add a full url a a variable like so

JavaScript

When i however try to call this in postman

JavaScript

I get

JavaScript

However if i do anything else, for example

JavaScript

I get the correct response

What am I doing wrong ?

Advertisement

Answer

You can add a requirements on your route annotation like:

JavaScript

And to check I use the url : https://127.0.0.1:8000/url-test/https://www.google.de/

Documentation: https://symfony.com/doc/4.1/routing/slash_in_parameter.html

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement