Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug headers as JSON - Fix #465 #535

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

ecoologic
Copy link
Collaborator

@ecoologic ecoologic commented May 20, 2024

Fix #465

Headers as JSON will be more helpful for debugging.

No tests, but this is dev only.

Example

Before

> (string) $client->getDebug();
= LastResponseCode: 200, LastResponseError: null, LastResponseHeaders: Array, LastRequestHeaders: Array, LastRequestBody:

After

> (string) $client->getDebug();
= "LastResponseCode: 200, LastResponseError: null, LastResponseHeaders: {"Date":["Mon, 20 May 2024 02:11:12 GMT"],"Content-Type":["application\/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"x-zendesk-api-version":["v2"],"x-zendesk-application-version":["v20929"],"x-frame-options":["SAMEORIGIN...."]}, LastRequestHeaders: {"Host":["z3n-api-client-rb.zendesk.com"],"Accept":["application\/json"],"Content-Type":["application\/json"],"User-Agent":["ZendeskAPI PHP 3.0.1"]}, LastRequestBody: "

@ecoologic ecoologic requested a review from a team as a code owner May 20, 2024 02:16
@ecoologic ecoologic merged commit 276fb53 into master May 24, 2024
3 checks passed
@ecoologic ecoologic deleted the RED-2203-debug-headers-as-string branch May 24, 2024 03:06
@mtk3d
Copy link

mtk3d commented Jun 19, 2024

Sorry, I missed that, it looks good
Thank you for fixing! 💪

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.

Array to string conversion error
3 participants