Archived Forum Post

Index of archived forum posts

Question:

req.AddParam newline character

Nov 12 '14 at 19:34

I'm trying to send a "\n". When I use something like: req.AddParam("Body","Line 1 n Line 2")

It gets urlencoded to Line%201%20%5Cn%20Line%202

Instead of keeping the line break. I've also tried to use %0a instead of n and that gets encoded to %250a Is there a way to send a newline?


Answer

Maybe many req.add ? Req.add(line); Req.Add(line); etc


Answer

James, I think there is some confusion. The .AddParam is for adding key/value pairs to the URI you will be sending the request to. Because params become part of the URI, multi-line strings may not work. If you are trying to add text to the body of the request, use .LoadBodyFromString instead.

-Erik