By default the new Angular Http client (introduced in v4.3.1
) uses JSON as the data format for communicating with the backend API. However, there might be situations where you may want to use some other format, like text/plain
for fetching a CSV file. Using the responseType
property this can be achieved quite easily.