You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a lot of cases where the HTTP method (GET, POST etc) needs to be dynamic, especially in scripts. This would be a good feature to have.
Something like requests.send(url, method="GET")
For example, in javascript's fetch, there's await fetch('/article/user/update', { method: 'POST',
or
in jquery, there's $.ajax({ url: "/article/post/get", method: 'POST',
The text was updated successfully, but these errors were encountered:
Fixes#67Fixes#52
This was always possible in a roundabout way via
```scala
requests.Requester("get", requests.Session()).apply("https://www.google.com")
```
But this PR adds a convenient alias and documents it for discoverability
```scala
requests.send("get")("https://www.google.com")
```
There are a lot of cases where the HTTP method (GET, POST etc) needs to be dynamic, especially in scripts. This would be a good feature to have.
Something like
requests.send(url, method="GET")
For example, in javascript's fetch, there's
await fetch('/article/user/update', { method: 'POST',
or
in jquery, there's
$.ajax({ url: "/article/post/get", method: 'POST',
The text was updated successfully, but these errors were encountered: