http
http copied to clipboard
Sending a custom http method
Hi, I wanna use a method like 'CLAIM' instead of Get, post, delete, etc. How can do that?
Have you found a solution?
Just ran into this little issue myself. The solution is to just construct the request yourself and then send it E.g:
makeClaimRequest(url) {
final response =
await http.Request("CLAIM", url).send().then(http.Response.fromStream);
// Do stuff with the response...
}
There might be better ways than this, but this is what I figured out after poking around at the lib a little bit