function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gaurav PatilGaurav Patil 

How to debug signed request made by canvas app ?

I have created canvas app which will make signed request to third party app. Along with this I am adding parameters to <apex:canvasApp parameters="here" > tag

I want to debug this request and parameters. Any thoughts ?

Martin Luth 1Martin Luth 1
If you specify your own handling function, r will be the Request instance that generated the event, and type will be one of the following values:
-request - Headers were sent to the server and will be included as data.headers. data.body may also be present for POST requests.
-response - Headers were received from the server and will be included as data.headers. Note that request only buffers the response body if a callback was given, so it will only be available as data.body if the initial call to request included a callback.
-redirect - A redirect status code (HTTP 3xx) was received. The data object will have properties statusCode, headers, and uri (the address of the next request).
-auth - A HTTP 401 Unathorized response was received. Internally, request handles this like a redirect, so the same properties will be available on the data object.
I have some good work experience with a OOH ERP (http://www.platooh.com) and my words are clearly based on what I felt through such processes in the past.

 
Gaurav PatilGaurav Patil
Thanks Martin,
For your valuable suggestion. But now I don't need to debug request so I didn't implement in this way
Pooja Kadam 5Pooja Kadam 5
Hi Martin Luth,

We have a use case to have a canvas app and to send few parameters from salesforce objects in the Parameters attribute of a canvas app. 
We are calling this app from a Lightning component which is place on a quick action. I am posting the Lightning component screenshot here.
User-added image

The 3rd party is sending a response of Http(3xx) when we load the canvas app with some parameters. I need to capture this response from 3rd party app(Which is canvas app)  inside my lightning component and then use this to do further Insert/update on a particular object.

How can I achieve this. I went through <force:canvasApp> attributes where there is "onCanvasSubscribed and other attributtes too. But I am not getting to a place to make this work as per my use case mentioned above.

As you mentioned above "Headers were received from the server and will be included as data.headers." , can you please put some more idea as to how I could get this working in Lightning component. Is there any canvas library or so to be used within my Lightning component?.

Can you or others put more ideas on this. Thanks in advance.