Skip to content

Commit

Permalink
Improved the body BC break description in request/response for 8.x do…
Browse files Browse the repository at this point in the history
…cumentation (#2117)

* Improved the body bc break in 8.x documentation

* Removed just in the sentence
  • Loading branch information
ezimuel authored Jan 4, 2024
1 parent 5413eb5 commit 6eabf37
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/changelog.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ The client API leaks HTTP-related notions in many places, and removing them woul

This could be a rather big breaking change, so a double solution could be used during the 8.x lifecycle. (accepting body keys without them being wrapped in the body as well as the current solution).

To convert code from 7.x, you need to remove the `body` parameter in all the endpoints request.
For instance, this is an example for the `search` endpoint:

[source,js]
----
// from
Expand Down Expand Up @@ -399,6 +402,12 @@ If you weren't extending the internals of the client, this won't be a breaking c
The client API leaks HTTP-related notions in many places, and removing them would definitely improve the DX.
The client will expose a new request-specific option to still get the full response details.

The new behaviour returns the `body` value directly as response.
If you want to have the 7.x response format, you need to add `meta : true` in the request.
This will return all the HTTP meta information, including the `body`.

For instance, this is an example for the `search` endpoint:

[source,js]
----
// from
Expand Down

0 comments on commit 6eabf37

Please sign in to comment.