MCPcopy
hub / github.com/angular/angular / addBody

Function addBody

packages/common/http/src/client.ts:43–48  ·  view source on GitHub ↗

* Constructs an instance of `HttpRequestOptions ` from a source `HttpMethodOptions` and * the given `body`. This function clones the object and adds the body. * * Note that the `responseType` *options* value is a String that identifies the * single data type of the response. * A single overlo

(options: HttpClientCommonOptions, body: T | null)

Source from the content-addressed store, hash-verified

41 *
42 */
43function addBody<T>(options: HttpClientCommonOptions, body: T | null): any {
44 return {
45 body,
46 ...options,
47 };
48}
49
50/**
51 * Performs HTTP requests.

Callers 3

patchMethod · 0.85
postMethod · 0.85
putMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…