I'm using the SharePoint online REST API. Things generally work fine, but I'm failing to figure out how to get information about a file (document) that contains a quote in its name. Here's my REST call:
https://mysite.sharepoint.com/_api/Web/getfilebyserverrelativeurl("/Shared Documents/Roy's quoted doc.txt")
The response I'm getting is '400 Bad Request', with the error being "The expression "Web/getfilebyserverrelativeurl("/Shared Documents/Roy's quoted doc.txt")" is not valid."
I've tried all sorts of tricks with encoding the path (%27 encoding for the quote sign, backslashing the quote, etc.), but failed to figure out the right one.
Is there any kind of encoding I'm not aware of?