* Normalized method name by uppercasing. * @param {string|undefined} method * @return {string} * @private
(method)
| 13459 | * @private |
| 13460 | */ |
| 13461 | function normalizeMethod_(method) { |
| 13462 | if (method === undefined) { |
| 13463 | return 'GET'; |
| 13464 | } |
| 13465 | method = method.toUpperCase(); |
| 13466 | |
| 13467 | assert( |
| 13468 | allowedMethods_.includes(method), |
| 13469 | 'Only one of %s is currently allowed. Got %s', |
| 13470 | allowedMethods_.join(', '), |
| 13471 | method |
| 13472 | ); |
| 13473 | |
| 13474 | return method; |
| 13475 | } |
| 13476 | |
| 13477 | /** |
| 13478 | * Sets up and normalizes the FetchInitDef |