diff --git a/packages/common/http/src/client.ts b/packages/common/http/src/client.ts index b374d471a2..945feece0a 100644 --- a/packages/common/http/src/client.ts +++ b/packages/common/http/src/client.ts @@ -20,6 +20,12 @@ import {HttpEvent, HttpResponse} from './response'; /** * 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 overload version of the method handles each response type. + * The value of `responseType` cannot be a union, as the combined signature could imply. + * */ function addBody( options: { @@ -46,10 +52,15 @@ export type HttpObserve = 'body' | 'events' | 'response'; /** * Performs HTTP requests. - * * This service is available as an injectable class, with methods to perform HTTP requests. * Each request method has multiple signatures, and the return type varies based on * the signature that is called (mainly the values of `observe` and `responseType`). + * + * Note that the `responseType` *options* value is a String that identifies the + * single data type of the response. + * A single overload version of the method handles each response type. + * The value of `responseType` cannot be a union, as the combined signature could imply. + * * @usageNotes * Sample HTTP requests for the [Tour of Heroes](/tutorial/toh-pt0) application.