I have read some articles about adding a file to SharePoint where the body contains text when using a REST POST call with GetFolderByServerRelativeUrl body add().
Can anybody help me to add a pdf file this way. See below as an example I found while googling ?
What is the field to be used?
url: http://site url/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files/add(url='a.txt',overwrite=true) method: POST body: "Contents of file" Headers: Authorization: "Bearer " + accessToken X-RequestDigest: form digest value content-length:length of post body