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

Decoded images with parameter false #5

Open
JonnyBR12 opened this issue Apr 11, 2019 · 0 comments
Open

Decoded images with parameter false #5

JonnyBR12 opened this issue Apr 11, 2019 · 0 comments

Comments

@JonnyBR12
Copy link

Hey there! Not sure if this is something I'm doing wrong with the plugin or something I need to resolve outside of it so apologies if it's the latter.

I'm using Fetch (thanks!) and trying to get an image from an endpoint which in the docs, should return as a string. When I add the parameter 'false' I get a character blob (attached screenshot snippet). Without 'false', I get NULL returned. Is this what should be happening or is there something I can add to the options to pull this through?

Any help would be really appreciated.

blob

The cURL request I'm trying to replicate with Fetch is:

curl -X GET "https://XXXXX/image/XXXXX/XXXXX/12345" -H "accept: image/jpeg" -H "Authorization: Basic XXXXX"

My current code is:

{% set imageOptions = {
headers : {
    Authorization: ['Basic XXXXX'],
    Accept: 'image/jpeg',
}
} %}
{% set image = fetch(client, 'GET', 'image/XXXXX/XXXXX/12345', imageOptions, false) %}`
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

No branches or pull requests

1 participant