omniphx / forrest

A Laravel library for Salesforce
https://omniphx.github.io/forrest/
MIT License
259 stars 120 forks source link

added raw format in order to return unformated guzzle response #349

Closed happybunnyz closed 2 months ago

happybunnyz commented 4 months ago

Hey there, small pull request to introduces the option to retrieve the raw Guzzle response by adding format = 'raw'.

omniphx commented 2 months ago

Hi @happybunnyz, haven't tested this out in a while but you should be able to get a raw response using none: https://github.com/omniphx/forrest?tab=readme-ov-file#raw-response-output

If it's not working as intended, I'm happy to merge this in for you

happybunnyz commented 2 months ago

Thank you for the response. I've just tested it again.

The none option will return only the body/content of the Guzzle response but unformatted only. It still strips the headers and other parts of the Guzzle response.

For my project, I need to retain the headers for logging purposes.