svrcekmichal / redux-axios-middleware

Redux middleware for fetching data with axios HTTP client
MIT License
918 stars 96 forks source link

Allow passing options to action #15

Closed svrcekmichal closed 8 years ago

svrcekmichal commented 8 years ago

Idea is to allow passing options like returnRejectedPromiseOnError to action.

{
  type: 'LOAD',
  payload: {
    request:{
      url:'/categories',
      options: {
        returnRejectedPromiseOnError: true
      }
    }
  }
}

This way user can override client options in middleware setup. Options will be merged:

default options => middleware options => action options

svrcekmichal commented 8 years ago

17 With support of multiple clients we now have new structure:

default options => middleware options => client options => action options You can't do all changes on all layers, but you can find what you can do in documentation

svrcekmichal commented 8 years ago

closed with #17