java - Does curl remove new line characters? -


i'm posting text file contains list on multiple lines service via curl. when read body of request in spring mvc controller there no new line characters , text on 1 line.

does curl remove new line characters? there way maintain new line characters need them parse text. here snippet code using read post body:

    stringbuilder builder = new stringbuilder();     string line = null;      try {         bufferedreader reader = request.getreader();         while ((line = reader.readline()) != null) {// 1 line of text!             builder.append(line);         }     } catch (exception e) {          //handle exception     } 

yes, curl removes linebreaks data posted -d option. use --data-binary instead. see question how send line break curl? more info.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -