Skip to content

PAT-1866 Return the response from ApiClient::sendRequest()#526

Closed
pepamartinec wants to merge 1 commit into
mainfrom
pepa/common-api-lib-send-response
Closed

PAT-1866 Return the response from ApiClient::sendRequest()#526
pepamartinec wants to merge 1 commit into
mainfrom
pepa/common-api-lib-send-response

Conversation

@pepamartinec

@pepamartinec pepamartinec commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Release Notes

https://linear.app/keboola/issue/PAT-1866

ApiClient::sendRequest() previously returned void, discarding the response. This changes it to return the ResponseInterface — a backward-compatible widening, so existing callers that ignore the return value are unaffected.

This lets a client decode the raw response body itself when the array-based sendRequestAndMapResponse() is unsuitable — e.g. payloads that must preserve the JSON object/array distinction, which an associative-array decode would lose ({} collapses to [], integer-keyed objects get renumbered). The first consumer is the sync-actions-api-php-client migration.

Now that sendRequest() returns the response, the private doSendRequest() was a redundant indirection — it is folded into sendRequest(), which gains the optional per-request $options (already public via sendRequestAndMapResponse()).

Plans for customer communication

None.

Impact analysis

No end-user impact. Backward-compatible for all existing consumers — a void method now returns a value callers may ignore. The four already-migrated clients (vault, sandboxes, git-service, configuration-variables-resolver) are exercised by CI here and are unaffected.

Change type

Improvement

Justification

Enable clients to decode raw response bodies, needed by the sync-actions migration (PAT-1866).

Deployment

Merge & automatic deploy.

Rollback plan

Revert of this PR.

Post release support plan

None.

@linear

linear Bot commented Jun 22, 2026

Copy link
Copy Markdown

PAT-1866

sendRequest() previously returned void and discarded the response. Return the
ResponseInterface (a backward-compatible widening) so callers can decode the raw
body themselves -- e.g. clients whose payloads must preserve the JSON
object/array distinction -- without going through the array-based
sendRequestAndMapResponse().

Now that sendRequest() returns the response, the private doSendRequest() was a
redundant indirection: fold it into sendRequest(), which gains the optional
per-request $options (already public via sendRequestAndMapResponse).
@pepamartinec pepamartinec force-pushed the pepa/common-api-lib-send-response branch from dad6940 to 5093d3a Compare June 22, 2026 09:55
@pepamartinec

Copy link
Copy Markdown
Contributor Author

Folded into #524 — the base-client change (ApiClient::sendRequest() returning the response + doSendRequest() merge) is trivial, so it ships in the single sync-actions PR rather than separately. Closing.

@pepamartinec pepamartinec deleted the pepa/common-api-lib-send-response branch June 22, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant