406 error when uploading documents

0 votes
Hello, I am trying to use the REST API in my web application to add a document to a package. When I submit my form with a POST request, I am getting a 406 error. The accept header I'm using is application/json. What should I use instead? Thanks, Rex

Approved Answer

Reply to: 406 error when uploading documents

1 votes
Try using "text/html" instead or removing the accept header entirely. If you use the developer tools in your browser (I used Chrome), while performing an upload with the UI, you'll see that the e-SignLive web application uses "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", but that's probably overkill. The "text/html" will likely do it. Let me know if this works for you.

- Michael

Director, Partner and Developer Technologies, OneSpan

Facebook - Twitter - LinkedIn

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off