You can save the expected string to a file, save your string to a file, and run diff on a hexdump of both. Even without hexdump, you should see the difference between "\n" and "\\n" in properly escaped output.
Or am I misunderstanding you?
But couldn't you then just make the call to an echo service (like HTTPbin) or simply dump the request when you send it?