* The HTTP method to use when requesting the URI. If no method * has been explicitly set, then ``GET`` is used if the body is * null and ``POST`` otherwise.
()
| 209 | * null and ``POST`` otherwise. |
| 210 | */ |
| 211 | get method() { |
| 212 | if (this.#method) { |
| 213 | return this.#method; |
| 214 | } |
| 215 | if (this.hasBody()) { |
| 216 | return "POST"; |
| 217 | } |
| 218 | return "GET"; |
| 219 | } |
| 220 | set method(method) { |
| 221 | if (method == null) { |
| 222 | method = ""; |