svrcekmichal / redux-axios-middleware

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

method get how to set data? #96

Closed Liqiankun closed 5 years ago

Liqiankun commented 5 years ago

2018-11-26 6 00 53 Here is my code

export function fetchUserList() {
    return {
        type: GET_HOME_DATA,
        payload: {
            request: {
                method: 'GET',
                url: `/users`,
                params: {
                    name: 'Lee'
                }
            }
        }
    }
}

Is this the right way?

Liqiankun commented 5 years ago

This is the right way! I tested it!