POST -> GET
#566
Replies: 1 comment
-
seems bypass can do this,but i tried, didn't work as my expectation.. proxy:{
target: 'http://localhost:3000',
pathRewrite: {'\\?.*$': ''},
bypass: function(req, res, proxyOptions) {
if(req.method === 'POST'){
req.method = 'GET';
}
return req.url;
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
something like that...
Actual behavior
Haven't found a way to do this.
client info
webpack4
Beta Was this translation helpful? Give feedback.
All reactions