Greetings.
I encountered the same problem today while generating the CSRF token token from the Advanced Rest Client.
I did the following change and it worked for me,
The hostname was by default in capital letters. I simply changed them to lowercase before executing.
Please check the same from your end