-1

I have the following call to my webservice:

http://xxx/GetTrackerData/{"KundenNr":"1111","Domain":"SuppKdNr036373#0001","Datum":"20.10.2015","AuftrNr":"2015018"}

On server-side, I get the following value for the parameters:

{"KundenNr":"1111","Domain":"SuppKdNr036373

The value is cut off as soon as a # is included in one of the JSON values. Can anyone tell me, how to encode the # correctly?

I've tried %23, but this doesn't work. Any help would be great.

gogcam
  • 149
  • 9

1 Answers1

1

I've found the solution. I don't have to encode it once, I need to do it twice.

Encoding #

Once: %23

Twice: %2523

This lead me to the solution: Percent-encode URL Twice

With encoding twice, special chars are correctly sent to server and interpreted by webservice.

Community
  • 1
  • 1
gogcam
  • 149
  • 9