Closed chexxor closed 11 years ago
Alright, I moved the retry parameter to the far right. I also fixed the method called in the error callback. Good catch!
Don't know if it's helpful, but here's a working example that uses the new method signature in this pull request.
Wow - I can't believe this pull request is still open - apologies - merging now!
I believe it's pretty common to set HTTP headers when using REST. I added a parameter to the apexrest function to pass in a map of header names to head values. What do you think?
Example:
forcetk.Client.apexrest('attach', function(msg){ alert('rest response'+msg); },//callback function(msg){ alert('err:'+msg.responseText); },//error 'POST',//method e.target.result,//payload {upload_filename:"filename", upload_pid:"parentObjectID"},//paramMap true);//retry
Signed-off-by: Alex Berg chexxor@gmail.com