Bug reading csv by http request (Webservice)

Asked

Viewed 91 times

0

I am having trouble reading a csv file via http request. It would be a Restful webservice that receives a csv and uses its contents. I’ve tried to read it in different ways, with opencsv, Javacsv.. Anyway, the bug I’m having is that simply by passing the file by http request the Readers do not recognize the line break ' n' and the file ends up being as if it were a single line. In all these forms I tested to set in the "hand" the delimiter ',' and the line break ' n', without success. The times I was successful, was passing the csv in form of Base64 and then converting it into service, but I would not like my client to need to convert the file before sending. Another way was changing the line break ' n' by ';', but this is already out of the standard and the client would have a lot of work to set. If anyone has been through this before, please share your experience. Thanks in advance!

  • Does Alan have any code to exemplify? csv format is quite simple, it only has a separation of columns by point and vircula ";" thus being "valor1;valor2;"

  • This question is best formatted here in stackoverflow: http://stackoverflow.com/questions/38188028/bug-reading-a-csv-file-from-an-http-request-webservice .

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.