This topic contains 3 replies, has 3 voices, and was last updated by Adolfo Garza 6 years, 2 months ago.

  • Author
    Posts
  • #1485

    darrenhillconsulting

    So,

    In SS1.0, the BeforeLoad gave you the nolbjRequest object … which was handy to you wanted to pass in some vales via the querystring parameters. In SS2.0, I was expecting similar access to an https.ServerRequest object. But aghast! Its not there!

    Any clever ideas on how to check the querystring parameters in the beforeload of an SS2.0 script?
    This is a cached copy. Click here to see the original post.

  • #1486

    darrenhillconsulting

    Oh undocumented glory! The request obecjt IS there. Just NOT in the SS2.0 documentation.

    After JSON.stringifying the context, I see that the request is in the … as http.ServerRequest (odd, I would have expected https)


    david.smith replied on 11/28/2016, 08:22 AM: Gotta love the docs! In SS2.0 you don’t need to stringify if that’s the only thing in the log detail.

    log.debug("scriptContext", scriptContext);

  • #26054

    Grant Le Roux
    Member
    @grant_le_roux

    Sorry to bring up an old thread, but this is driving me nuts.

    log.debug(“request”, context.request);

    Running this against a “print” type gives an error every time!

    “Cannot read property \”getMethod\” from undefined”

    Did you ever figure out how to get the request to play nice?

  • #26055

    Adolfo Garza
    Member
    @adolfo_garza

    Do you have anything else besides that line of code in your code? Try with log.debug(โ€œrequestโ€, context.request.method);

You must be logged in to reply to this topic.