Handle contentType Text and Json

Sorry for the CRLF fix, but i wasn't able to commit without this fix. Do you use windows ?

I had to duplicate my pull request because of rebase's difficulty.