ahmader / node-zoho

Zoho API access for NodeJS
21 stars 15 forks source link

Ideas for implementing download[File/Photo] #49

Closed pahan35 closed 6 years ago

pahan35 commented 6 years ago

At this moment when I try execute downloadFile method via package I see that it happens error on response parsing stage because response tries to parse file body as XML and this caused error.

image

We've got content-type header in response and it is different than application/xml.

The correct expected result from this method is origin response body and parsed Content-Disposition header which easily can be done with this package

What do you think about the way of implementing this method?

ahmader commented 6 years ago

@pahan35 Check #53 I have implemented downloadFile method. Also the tests pass for uploadFile, downloadFile and deleteFile. I did not put it on master yet, tell me if it works with you?

pahan35 commented 6 years ago

@ahmader yes. This method works pretty well.

Thanks for your work.