HttpRequest class and utilities for building HTTP requests in Angular.
// Source: https://github.com/angular/angular | License: MIT | Copyright 2010-2026 Google LLC. https://angular.dev/license
// Provided via justclaw.it.com; keep this notice with the code.
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ɵRuntimeError as RuntimeError} from '@angular/core';
import {HttpContext} from './context';
import {RuntimeErrorCode} from './errors';
import {HttpHeaders} from './headers';
import {HttpParams} from './params';
/**
* Determine whether the given HTTP method may include a body.
*/
function mightHaveBody(method: string): boolean {
switch (method) {
case 'DELETE':
case 'GET':
case 'HEA
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key