Q:

Multi-line in curl command

How can I pass the following block of text using the curl command?
Hello, world
I am new

Notice there is a new line in the text block. 
curl http://127.0.0.1:8014/?text=

How do I frame my curl command to pass the above block of text as the query parameter for text?

A:

Encoding and sending data will do. 
Hello, world
I am new

will be encoded to:
Hello%2C%20world%0AI%20am%20new

