[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: JsonObject Returned is "application/octet-stream: When Expecting "application/json" //

Status
Not open for further replies.
V

v205

Guest
@peter Thank you for following up. So, I did some more debugging following your advice and I am seeing the following logs (all attached). From the "response-data-received" file, it is clear that the response Content-Type is "application/json" as that is what is in the response header. Also, the response content, as expected, is just a simple "success" (9 characters). One problem is that when I parse the response using a OpenEdge.Core.Memptr:GetString(1) method call, it only returns the first 8 characters from "success". This is also evidenced by the following set of lines from the debug logs (attached as api.log): [19/01/04@15:37:03.498-0500] P-012148 T-010128 1 4GL LogMgrWrtr Error(s) raised: Progress.Json.JsonParserError [19/01/04@15:37:03.498-0500] P-012148 T-010128 1 4GL LogMgrWrtr Json Parser Error at offset 9: parse error: client cancelled parse via callback return value. (16068) (16068) [19/01/04@15:37:03.498-0500] P-012148 T-010128 1 4GL LogMgrWrtr [OE.N.HTTP.L.ABLS.ABLSocketLibrary ERROR] EXTRACT ENTITY: Response entity contains raw message body [19/01/04@15:37:03.499-0500] P-012148 T-010128 1 4GL LogMgrWrtr [OE.N.HTTP.L.ABLS.ABLSocketLibrary ERROR] EXTRACT ENTITY: Response Content-Type changed from application/json to application/octet-stream It appears to be that the endpoint is returning the "success" response in the expected "application/json" content type, but the ABL library has a problem parsing the response correctly. Could this be a bug? I am re-attaching both the calling program "SampleX.p" and the underlying Class I am using for the REST methods - "RestConnector.cls". TIA, h(Please visit the site to view this file)(Please visit the site to view this file)(Please visit the site to view this file)(Please visit the site to view this file)(Please visit the site to view this file)(Please visit the site to view this file)

Continue reading...
 
Status
Not open for further replies.
Top