I like to use curl instead of UI tools like Postman for debugging my RESTful web services traffic whenever possible. I however didn’t like my output being messed up by the bash prompt being suffixed to the output. Something like the following:
$ curl -H "$auth_token" http://localhost:8080/xyz/abc-efg
["-","A","B","C","D","E"]$
So basically what I needed was to have a new line forced after the curl output. A quick search on internet yielded this article. So I executed the following command on my terminal.
$ echo '-w "\n"' >> ~/.curlrc
After doing this when I execute the same curl command I get the following output.
$ curl -H "$auth_token" http://localhost:8080/xyz/abc-efg
["-","A","B","C","D","E"]
$
So now the bash prompt is actually coming on a new line by default!