I am experiencing an issue with my service where the double quotation marks in my API URL are not displayed as they should be. Instead of displaying ".."
around my values, it prints out like %22%27
when the API is called. How can I ensure that my double quotation marks appear correctly in the URL?
Code
return this.http
.get(`${this.env.HELPDESK_LIST_FILTER}` + '[{ "value": ' + `'"${value}"'` + ', "field": ' + `'"${column}"'` + ', "sort": ' + `'"${sort}"'` + ', "op": ' + `'"${filter}"'` + ' }]', params)
.pipe(map((data) => data));
My desired URL format is:
https://example.com/api/tickets?filters=[{"value":"una","field":"name","sort":"none","op":"like"}]
However, my current URL looks like this:
https://example.com/api/tickets?filters=[{%20%22value%22:%20%27%22una%22%27,%20%22field%22:%20%27%22name%22%27,%20%22sort%22:%20%27%22none%22%27,%20%22op%22:%20%27%22like%22%27%20}]
Any suggestions on how to fix this issue?