0

I have an iframe that uploads video recordings to a server, when the recording is complete we receive back a call telling us that the video has been uploaded, I am trying to expose a notification on my visualforce page from the user once the HttpPost happens but I am at a loss how to go about this. Currently my Inbound API call is:

InboundILOS

@RestResource(urlMapping='/Widgets/*')
global with sharing class InboundILOS {

    @HttpPost 
    global static String createILOS() {
        ILOS_Intergration_Post__c w = new ILOS_Intergration_Post__c();
        String requestBody = RestContext.request.requestBody.toString();
        w.JSON_Response__c =requestBody;
        JSON2ApexResp resp = JSON2ApexResp.parse(requestBody);
        System.debug(resp.token);
        w.token__c=resp.token;
        w.videoURL__c=resp.videoURL;
        w.embedURL__c=resp.embedURL;
        w.randTag__c=resp.randTag;
        w.iframe__c=resp.iframe;
        insert w;
        return 'Upload Complete';
    }    
}

How would I pass a response into a visualforce controller from this http post? Im unsure of the process on how this would work exactly

  • Please reduce you post and code to a specific problem, where is it exactly that you are facing issues? – glls Oct 19 '17 at 11:31
  • Ive edited the question – Nebbyyy Oct 19 '17 at 11:43
1

How would I pass a response into a visualforce controller from this http post? Im unsure of the process on how this would work exactly

So here is the thing, data cant be just passed to vf pages controller and they will suddenly show up in UI. If you want to show some notification I guess the right way to do would be streaming API , you can also look into platform events for this.

The idea is you have to subscribe to a topic (which you will create) and listen for events.

Have a look at this https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.