I want to send new-line-character as part of a value of a post request (text)variable. I am using wget to fire the request. How do I code that ?
Asked
Active
Viewed 3.4k times
13
-
1Post the code you have so far – Michael Robinson Jun 07 '11 at 08:05
-
Maybe same for curl: http://stackoverflow.com/questions/3872427/how-to-send-line-break-with-curl – Ciro Santilli OurBigBook.com Dec 04 '14 at 14:21
1 Answers
23
According to the W3C spec, you encode a line break as %0D%0A
in the x-www-form-urlencoded
format -- which is what you hand to the --post-data
option to wget.

LHMathies
- 2,384
- 16
- 21
-
i didn't get it. what exactly to do. i selected x-www-form-urlencoded and added %0D%0A where ever line break needed. but it was passed as string. eg: content: something %0D%0A somewhere. the content param was passed as "something %0D%0A somewhere" – kanchan Feb 10 '16 at 08:44
-
Note that the question (and the answer) were about sending request from shell scripts using the `wget` tool. I suspect your situation is different, please search for an answer that fits better. – LHMathies Feb 27 '16 at 10:39