1to1plus / dymo-js-sdk

Other
6 stars 0 forks source link

framework.is550PrinterAsync is not working properly #3

Open p8nut opened 1 year ago

p8nut commented 1 year ago

the function framework.is550PrinterAsync fail with the error 400 missing Printer Name but in my code i did put a valid name. here is the request made by the lib https://127.0.0.1:41951/DYMO/DLS/Printing/Is550Printer?0=printerName%3DDYMO%2520LabelWriter%2520550 and what it should have been https://127.0.0.1:41951/DYMO/DLS/Printing/Is550Printer?printerName=DYMO%2520LabelWriter%2520550

maybe the qs.stringify is not encodinq the parameters right ?

have you encounter this error before ? FYI i use the npm package.

Thanks for your help

zach2825 commented 1 year ago

That is weird, I don't use that call myself. To create this repo and npm package, I took the original lib from dymo and updated it to use ES6 and Axios for the calls. I did my best to port everything over.

But that param does look like it's being sent with bad URL encoding.

If anything, we can remove the qa.stringify stuff since axios does that automatically.

p8nut commented 1 year ago

would you like me to remove the qs.stringify and create a PR ?