T
T
tennalian2018-04-23 11:54:00
JavaScript
tennalian, 2018-04-23 11:54:00

How to escape get request characters in HttpClient Angular 5?

The essence of the problem:
I need to send a request to the osrm service of the form

polyline(kxsrI_h%7BcFd%5CiyGb%[email protected]@[email protected]@[email protected]@[email protected]%[email protected][email protected]@%[email protected]%[email protected]@f%[email protected])

And everything was fine until the first Angular changed to the second :)
For example, the following string is passed to the httpClient service:
polyline([email protected]}Vn}nsIpubdF}[email protected]~l\`rLsgK`tJ`nA_tKanA~sK)

The output in the browser looks like this:
polyline([email protected]%7DVn%7DnsIpubdF%[email protected]~l/%60rLsgK%60tJ%60nA_tKanA~sK)

those. it is clear that some of the characters are escaped, some are not, or very strange. What can be done about it?
PS: I use polyline-encoded to encode points into such a string, if this is important.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tennalian, 2018-04-23
@tennalian

Issue resolved.
+ there should not be empty dots in outlets (I forgot to uncomment part of the functionality during the transfer))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question