REST API integration

I have converted PDF File into byte array and then that bytes into base64 string, I am trying to post some dynamic variables along with this base64 string in the body of the http request POST method, but then it is trying to post partial body excluding other details which is causing the bad request error. I would like to know any other ways to post the same, PS. the converted base64string is giving empty in message box but it is giving the details if I type into to notepad.