Facility Control

 View Only
  • 1.  asyncPost HTTP request returns 403

    Posted 01-31-2020 11:22

    Hi,

    I'm making some requests to a webserver which returns some json-formatet text. I've previously done this a bunch of times with success, even to the same web server yesterday. 

    Today the debugger gives me this: Server returned HTTP response code: 403. Apparently this has to do with "forbidden access". However, if I input the URL I'm sending a request to into my browser, or even in Postman, the webserver returns the correct results! 

    Is there any reason that when making requests from DashBoard it shouldn't return the same as any browser or the Postman application? 

    Thanks in advance,

    T



  • 2.  RE: asyncPost HTTP request returns 403

    Posted 01-31-2020 14:08

    Hi Tobias,

    Are you using the complete URL? For example; rossvideo.com versus https://www.rossvideo.com/?

    Could you send a snippet of the code you are using if that is possible?


    #DashBoard


  • 3.  RE: asyncPost HTTP request returns 403

    Posted 01-31-2020 14:20

    Yes, I'm using the complete URL.

    This link has a custompanel which illustrates the issue and below you'll find the code of the whole panel.

    <abs height="320" left="0" top="0" width="547">
    <button buttontype="push" fill="none" height="50" left="0" name="Get Event" style="bg#selectbg;" top="0" width="200">
    <task tasktype="ogscript">var path = 'http://player.georacing.com/datas/101877/event.json';
    ogscript.debug(path);

    function cb(results)
    {
    ogsccript.debug(results);
    }

    ogscript.asyncPost(path, null, cb);
    </task>
    </button>
    </abs>

    #DashBoard


  • 4.  RE: asyncPost HTTP request returns 403

    Posted 01-31-2020 15:18

    Just need a bit more information Tobias; is the server run by you or a 3rd party?

    Since the response has changed overnight, it is most likely due to an upgrade on the server side expecting a specific HTTP header field that the browser is providing but our HTTP connection is not.


    #DashBoard


  • 5.  RE: asyncPost HTTP request returns 403

    Posted 01-31-2020 15:42

    The server is ran by a 3rd party company. 

    I have never experienced a difference in response between a browser and DashBoard before. What kind of header information would that be? Have you encountered this behaviour before?


    #DashBoard


  • 6.  RE: asyncPost HTTP request returns 403

    Posted 01-31-2020 22:07

    An example of why this difference may have occurred overnight is that the website possible requires User Agent information from the DashBoard HTTP connection and may not have required this before.

    Unfortunately, we have not encountered this behavior before, and there isn't currently a solution for this problem on our end.


    #DashBoard


  • 7.  RE: asyncPost HTTP request returns 403

    Posted 05-15-2024 17:42

    Anyone ever figure anything out about this topic? Running into it myself at the moment, and wondering if it was at all possible to get around.



    ------------------------------
    Jake Lew
    Access Communications Co-Operative Limited
    Regina Canada
    ------------------------------



  • 8.  RE: asyncPost HTTP request returns 403

    Posted 05-16-2024 14:43

    Hi Jake,

    Can you confirm using postman or any other tool if the request you are trying to send returns the data? It seems like you may not have access to the resource you are trying to access. 

    Thank you,
    Aury R.



    ------------------------------
    Aury Rukazana
    Senior Software Developer
    Ross Video
    ------------------------------



  • 9.  RE: asyncPost HTTP request returns 403

    Posted 05-16-2024 14:50

    Never used Postman and not familiar with how to do so. I most likely do not have access, just trying to pull the source code of a public website so I can pull some roster info/stats from it. Some websites let me do it just fine, but others I get the 403 error, which I assume is from whatever header information the browser is sending that Dashboard is not.



    ------------------------------
    Jake Lew
    Access Communications Co-Operative Limited
    Regina Canada
    ------------------------------