Skip to content

POST -> GET #302

@cfkxzsat

Description

@cfkxzsat

Is this a question?

Can I change my request method from POST to GET? I don't want a POST request because I don't want to change my mock data.Thank you.

Expected behavior

    devServer: {
        proxy: {
            '/api/*': {
                target: 'http://localhost:3000',
                serve: req => {
                if (req.method === 'POST') {
                    req.method = 'GET';
                }
         }
    },

something like that...

Actual behavior

Haven't found a way to do this.

client info

webpack4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions