Skip to content

3.0.2

Compare
Choose a tag to compare
@SushilMallRC SushilMallRC released this 05 Aug 06:29
· 6 commits to master since this release
69a4f0d

What's Changed

Full Changelog: 3.0.1...3.0.2

Note:

Breaking Change: Added $body Parameter to delete Method

Change Summary:
The delete method in our HTTP client now includes a new $body parameter. This change allows users to pass a request body with DELETE requests.

Previous Method Signature:

public function delete($url = '', $queryParameters = [], array $headers = [], $options = [])

New Method Signature:

public function delete($url = '', $body = null, $queryParameters = [], array $headers = [], $options = [])

Impact on Existing Code:

  1. Existing code that calls the delete method without a $body argument will continue to function as before, as the $body parameter is optional and defaults to null.
  2. However, codebases that rely on positional arguments in method calls will need to update their calls to handle the new parameter, particularly if they are passing arguments that previously matched queryParameters, headers, or options.

Recommended Action:

  1. Review all instances of the delete method call in your codebase.
  2. Update method calls to explicitly specify parameters using named arguments where necessary, especially if your code relies on the position of parameters after $url.

Example After Changes with request body

`$body = array(
'records' => array(
'id1',
'id2'
)
);

delete(
'https://api.example.com/resource',
$body,
['param1' => 'value'], // Query parameters
['Content-Type' => 'application/json'] // Headers
);`