danwrong / restler

REST client library for node.js
MIT License
1.99k stars 391 forks source link

Readme file updates #180

Open AngelKyriako opened 10 years ago

AngelKyriako commented 10 years ago

Hello, I used the library for posting a multipart request to some server.

The file function is mistaken documented in the readme file.

This:

rest.file('doug-e-fresh_the-show.mp3', null, 321567, null, 'audio/mpeg')

should be more like this:

rest.file('audio/mpeg/doug-e-fresh_the-show.mp3', 'doug-e-fresh_the-show.mp3', 321567, null, null)

from what I see at LOC 33 in the multipartform.js

As u can see apart from changing the order of the arguments, the first argument(path) I wrote is not the dirpath of the file but it includes the name of the file as well. At least that workd for my case.

Best,

Angelos