I have got requirements like below:
/paymenturl?ordernr=123&amount=234&ourOwnCallbackUrl=$api/receipt?contractid=3232&callbackurl=https://somthing.com&fallbackurl=https:something.com¬ification=hit-hard
The question is basically how to add another URL to query parameter and can it be nested further?
you have to escape the special characters (like &
) I see two common ways:
encode it in percent-encoded
%20%2Fpaymenturl%3Fordernr%3D123%26amount%3D234%26ourOwnCallbackUrl%3D%24api%2Freceipt%3Fcontractid%3D3232%26callbackurl%3Dhttps%3A%2F%2Fsomthing.com%26fallbackurl%3Dhttps%3Asomething.com%26notification%3Dhit-hard
or you can create a complete DTO (Data transfer object ) and use the request body to send/receive it from your controller.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.