Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Question on acepting long coma delimited csv string in body of post method

$
0
0

Could someone help:  I have an  Angular 2 app with the following issue.  I would like to add functionality where the user can click a button and send a csv file as an attachtment via email.  From what I have found, this is not an easy task with Angular 2 or JavaScript. 

Thus my question:

Would it make sense for me to have an Web API POST method that accepts a long comma delimited string in the body (I would assume I need to set the Content-type: application/text to do that).  And then I could create the file and send the email in C#.  The bad part of this design is that First my Web API would be calling the db and sending a Json result, then the client would be sending the data back to the API as a coma delimited string to be converted to a file and emailed. 

Note: I thought about just sending the get parameter  and making the db call again, but these queries take long enough as it is and the delay could be an issue.

Any thoughts or advice would be greatly appreciated.

Thank You.


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>