Skip to content

Commit 75e90fa

Browse files
iconbenjosephperrott
authored andcommitted
docs(common): update docs for HttpClient methods (angular#38878)
PR Close angular#38878
1 parent 26afcdd commit 75e90fa

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

packages/common/http/src/client.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,8 +2528,8 @@ export class HttpClient {
25282528
}): Observable<HttpResponse<Object>>;
25292529

25302530
/**
2531-
* Constructs a `PUT` request that interprets the body as a JSON object and returns the full HTTP
2532-
* response.
2531+
* Constructs a `PUT` request that interprets the body as an instance of the requested type and
2532+
* returns the full HTTP response.
25332533
*
25342534
* @param url The endpoint URL.
25352535
* @param body The resources to add/update.
@@ -2547,14 +2547,14 @@ export class HttpClient {
25472547
}): Observable<HttpResponse<T>>;
25482548

25492549
/**
2550-
* Constructs a `PUT` request that interprets the body as a JSON object and returns the response
2551-
* body as a JSON object.
2550+
* Constructs a `PUT` request that interprets the body as a JSON object
2551+
* and returns an observable of JSON object.
25522552
*
25532553
* @param url The endpoint URL.
25542554
* @param body The resources to add/update.
25552555
* @param options HTTP options
25562556
*
2557-
* @return An `Observable` of the response, with the response body as a JSON object.
2557+
* @return An `Observable` of the response as a JSON object.
25582558
*/
25592559
put(url: string, body: any|null, options?: {
25602560
headers?: HttpHeaders|{[header: string]: string | string[]},
@@ -2566,15 +2566,14 @@ export class HttpClient {
25662566
}): Observable<Object>;
25672567

25682568
/**
2569-
* Constructs a `PUT` request that interprets the body as a JSON object
2570-
* and returns an observable of the response.
2569+
* Constructs a `PUT` request that interprets the body as an instance of the requested type
2570+
* and returns an observable of the requested type.
25712571
*
25722572
* @param url The endpoint URL.
25732573
* @param body The resources to add/update.
25742574
* @param options HTTP options
25752575
*
2576-
* @return An `Observable` of the `HTTPResponse` for the request, with a response body in the
2577-
* requested type.
2576+
* @return An `Observable` of the requested type.
25782577
*/
25792578
put<T>(url: string, body: any|null, options?: {
25802579
headers?: HttpHeaders|{[header: string]: string | string[]},

0 commit comments

Comments
 (0)