* 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.
()
| 265 | * null and ``POST`` otherwise. |
| 266 | */ |
| 267 | get method(): string { |
| 268 | if (this.#method) { return this.#method; } |
| 269 | if (this.hasBody()) { return "POST"; } |
| 270 | return "GET"; |
| 271 | } |
| 272 | set method(method: null | string) { |
| 273 | if (method == null) { method = ""; } |
| 274 | this.#method = String(method).toUpperCase(); |