Skip to content

Conversation

acrobat
Copy link
Collaborator

@acrobat acrobat commented Mar 28, 2021

For this to work I also had to change the way the default accept header, previously the header was appended which produced actually an incorrect accept header.

Previously is produced this (this was the same with preview headers being set):

Host: api.github.com
Accept: application/octet-stream
Accept: application/vnd.github.v3+json
User-Agent: php-github-api (http://github.com/KnpLabs/php-github-api)

With the default headers plugin being used

Host: api.github.com
Accept: application/octet-stream
User-Agent: php-github-api (http://github.com/KnpLabs/php-github-api)

Fixes #320

@acrobat acrobat force-pushed the binary-asset-downloads branch from ce5275f to af16ce7 Compare March 28, 2021 15:54
@acrobat acrobat force-pushed the binary-asset-downloads branch from af16ce7 to dc61c89 Compare March 28, 2021 15:55
* @return array|string
*/
public function show($username, $repository, $id)
public function show($username, $repository, $id, bool $returnBinaryContent = false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing phpdoc :)

Copy link
Collaborator Author

@acrobat acrobat Mar 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add it because it's fully documented in the typehint 😄

@acrobat acrobat merged commit 5c540ae into KnpLabs:master Apr 4, 2021
@acrobat acrobat deleted the binary-asset-downloads branch April 4, 2021 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support application/octet-stream for binary asset streaming
2 participants