You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the gateway expects an encoded JSON file with the data attribute holding the raw JSON details, this requires that the json is posted to HAPI when encoded already into base64 file, gateway then hits the resource URI to get the encoded json and use it to decode then read the appid.
The android client on the other hand accesses the binary files using the endpoint /Binary to get all the binaries it requires from the server, the challenge comes when the binary is posted as an encoded json the HAPI (v7.2.0) re-encodes it again when access using the /Binary endpoint as opposed to individual resource URI, this means that for the android client to get a singly encoded json we must post non-encoded json.
This issue is to make gateway read the raw json file it gets so as not to throw this error below; { "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "processing", "diagnostics": "HAPI-1359: Failed to parse response from server when performing GET to URL
The text was updated successfully, but these errors were encountered:
Performing a PUT with application/fhir+json as the Content-Type stops the FHIR server from encoding the body which is already a Binary resource.
Performing a GET/{{uuid}} with application/fhir+json as the Content-Type stops the FHIR server from decoding the response from the server.
Performing a GET/{{uuid}} with application/json as Content-Type allows the FHIR server to decode the response. The response is the actual image.
Performing a GET all with application/json as Content-Type does not trigger decoding on the server response. This is what the mobile application uses. Hence the need to decode using code.
@dubdabasoduba the PUT with headers application/fhir+json only helps with get all as the binary is not re-encoded however a get by ID decodes the binary resource irrespective of which headers are used.
When the encoded binary is posted using the application/json it works okay for the get-by ID but re-encodes when you get all irrespective of the header
The ultimate solution will be to still have the gateway consume the raw JSON and not encoded one IMO
Currently, the gateway expects an encoded JSON file with the data attribute holding the raw JSON details, this requires that the json is posted to HAPI when encoded already into base64 file, gateway then hits the resource URI to get the encoded json and use it to decode then read the
appid
.The android client on the other hand accesses the binary files using the endpoint
/Binary
to get all the binaries it requires from the server, the challenge comes when the binary is posted as an encoded json the HAPI (v7.2.0) re-encodes it again when access using the/Binary
endpoint as opposed to individual resource URI, this means that for the android client to get a singly encoded json we must post non-encoded json.This issue is to make gateway read the raw json file it gets so as not to throw this error below;
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "processing", "diagnostics": "HAPI-1359: Failed to parse response from server when performing GET to URL
The text was updated successfully, but these errors were encountered: