Get Query Body response

Hi,

I’m making a get request to google drive api v3. I’m trying to download a file from google drive.

Something like this:
https://www.googleapis.com/drive/v3/files/{{Table1.selectedRow.id}}?alt=media

These are the first two lines of the response body:

.+t?~;,r"iu’U4��Kkaq��s-bk{uzh=�ع�}���C%�w���s�{��;
3mTNO�V�!�U

The issue is that the the first two lines of the reponse body should look like this:

.+t?~;,r"iu’U4öç Kkaq¦Ås-bk{uzh=ªØ¹ª}‚ìÙC%è–w—›s’{À–;
3mTNOóVµ!³U

Anybody has a clue why some data is replaced with U+FFFD � REPLACEMENT CHARACTER? Is there a request parameter of request HEADER that i can input so that the server returns the correct response body?

Thanks.

The scrambled part of the content are special characters (I think Swedish characters, Not entirely sure).
UTF-8 encoding wouldn’t work very well in cases like this.

You might have to specify an encoding format so that it can properly parse the characters with:

Accept: text/html; charset=ISO-8859-1

I’m also not entirely sure if that’s the charset that would work for you but you can lookup how to decode/encode Swedish characters.

Also, change the text/html part to the type of content you’re expecting

Hello, we would like to know if you managed to solve this problem and if you solved it, what was the solution to be able to help another user who experiences it soon, thank you very much, and we apologize for the inconvenience.

already tried Latin-1 encoding not working.

These are the response headers:

{
“X-GUploader-UploadID”: “ADPycdsdTAtGassCE3cqmgp60B63z8GVc0gwjeJo-uv4Ocrrl9TuggOFpFLaox5QY6VrHotQxvN4LeqVSjFcfD-qe0K6QQ”,
“Content-Type”: “application/octetstream”,
“Content-Disposition”: “attachment”,
“Vary”: [
“Origin”,
“X-Origin”
],
“Expires”: “Fri, 20 Jan 2023 17:02:20 GMT”,
“Date”: “Fri, 20 Jan 2023 17:02:20 GMT”,
“Cache-Control”: “private, max-age=0, must-revalidate”,
“X-GUploader-Response-Body-Transformations”: “gzipped”,
“Warning”: “214 UploadServer gzipped”,
“Server”: “UploadServer”,
“Alt-Svc”: “h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"”,
“Transfer-Encoding”: “chunked”,
“X-APPSMITH-DATATYPE”: “TEXT”
}

I don’t think there is anything i can do. I think i’ll have to create my own api to fetch the correct data using GoogleAppScript.

Hello, we apologize for the problems you are currently facing, we have created a bug report for this problem, you can track it from this link:[Bug]: REST API Plugin: utf-8 encoded response it not correctly handled · Issue #19956 · appsmithorg/appsmith · GitHub