-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add asBase64
option in dhis2 get() function
#939
Conversation
...requestConfig, | ||
}).then(result => { | ||
console.log(`Retrieved ${resolvedResourceType}`); | ||
return handleResponse(result, state, callback); | ||
const response = asBase64 ? { data: encode(result.data) } : result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sent me on a bit of a rabbit hole. I think it will be really healthy to rebsae dhis2 on unidic and make it much more standardised
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtuchi this looks fine but I haven't tested it. Are you happy for me to release?
@josephjclark yeah i am happy for release |
Summary
Add
asBase64
option inget()
function which will convert theresponseType
option toarraybuffer
and when we get the result we convert the result into a base64 encoded stringFixes #884
Details
axios.interceptors.response
to ignorearraybuffer
response typeasBase64
option inget()
jsdocs
forget()
options argumentAI Usage
Please disclose how you've used AI in this work (it's cool, we just want to
know!):
You can read more details in our
Responsible AI Policy
Review Checklist
Before merging, the reviewer should check the following items:
production? Is it safe to release?
dev only changes don't need a changeset.