13

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 ?

LHMathies
  • 2,384
  • 16
  • 21
Apoorv Sharma
  • 131
  • 1
  • 1
  • 3

1 Answers1

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