I'm trying to send a string to an Http request using the following code
var outStr = "{product_code: \"660825\", quantity: \(qty)}"
As I've included the \ character it compiles ok but when I run it the value for outStr is
{product_code: \"660825\", quantity: 2}
What am I doing wrong and how can I lose the \?
As you can see in the documentation:
(snip)
you are doing it correctly, my guess would be that you server escapes the
"
as\"
and that is why you are seeing{product_code: \"660825\", quantity: 2}
.