How to send an ampersand in http post request

Respectfully request if anyone has had any luck on sending an ampersand (&) as part of the body in a http post request. I am trying to update addresses in our core system using a Http post and it works for all addresses except those that have a & in the address. When testing in SoapUi, I had to change the & to & to escape it. Doing this works but only in SoapUi. I have tried various other methods but nothing works. It returns a 500 status telling me the elements are not closed. These addresses are valid per USPS so I do not want to replace the & with the word and. Does anyone know of a way I can get around this? Any assistance would be greatly appreciated.

If you want to use an ampersand as a value inside the query string of a url (and not as a delimiter for separating arguments), then you should use the URL-encoded value: %26. Quotes should be encoded too ( " )

I’ve tried %26, "%26%, and ‘%26’. All that does is send those values instead of the &. What do you mean by quotes should be encoded?

The part of my code in question looks likes this: APT 1&2. This is part of my body which is formatted in text/xml.

have a look here:
one for the url
other for html / partly usable also for XML (if we want not use other options)

grafik

For using this method:
Close the xaml in UiPath studio
Take a backup of the XAML
Open the XAML in a text editor (e.g. notepad++)
Add following line to the corresonding section:
grafik
<AssemblyReference>System.Web</AssemblyReference>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.