* 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.
()
| 205 | * null and ``POST`` otherwise. |
| 206 | */ |
| 207 | get method() { |
| 208 | if (this.#method) { |
| 209 | return this.#method; |
| 210 | } |
| 211 | if (this.hasBody()) { |
| 212 | return "POST"; |
| 213 | } |
| 214 | return "GET"; |
| 215 | } |
| 216 | set method(method) { |
| 217 | if (method == null) { |
| 218 | method = ""; |