Giter Site home page Giter Site logo

backbone.fetch's People

Contributors

akre54 avatar just-boris avatar phoenix741 avatar spacek33z avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

backbone.fetch's Issues

Can't catch error

Hi,

I try to use this in my project, but i have a problem :

When i use like this :

object.fetch(options).then(function () {
   ...
}).catch(function () {
  ...
});

catch (on error, ie: 401) is never called because, the line .then(options.success, options.error) process the error.
So the error is considered as managed and the method then is called instead of catch.

I think that we should call options.error in a method a re-trigger the the exception.

Uploading files and multipart data

Very nice repo.

When uploading files with FormData and a multipart content-type, I get the following error:
Error: Multipart: Boundary not found

Setting the content-type to undefined forces the browser to set the boundary and content type.

http://stackoverflow.com/questions/35795529/fetch-api-and-multer-error-while-uploading-file
http://stackoverflow.com/questions/39280438/fetch-missing-boundary-in-multipart-form-data-post

I'm not sure if there is another way to manually set the content type to work with files, but removing the default content-type from the options allows for file uploads.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.