Using monkey to call an api behind https?

About Monkey 2 Forums Monkey 2 Programming Help Using monkey to call an api behind https?

This topic contains 3 replies, has 2 voices, and was last updated by  jondecker76 2 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16102

    Taiphoz
    Participant

    Does monkey support https yet ? not touched anything monkey related or code related for a long while now so very much out of the loop, but something’s come up recently that if I even bother trying to code it would require me being able to call a https uri to grab some json or xml output..

    also nice to see the site is still here.

    #16104

    jondecker76
    Participant

    I’m currently using monkey to interface with a few different REST APIs over https with no problem

    #16105

    Taiphoz
    Participant

    any chance i could see an example ?

    #16107

    jondecker76
    Participant

    This is straight from my current Amazon MWS API wrapper.  It’s kind of specific to what I’m doing, but that part that builds a request to send is the line starting with cmd=….

     

    You should be able to modify this for your own needs pretty easily (and get rid of the the generic return type if you just need a string)

    In my case as above, the type T has a constructor which accepts:
    – httpRequest (the original httpRequest, which is useful for debugging and logging)

    -result (the result integer returned from the wget command.  Also useful for logging, debugging and filtering

    – ldstr (the actual string returned by the API call. In my case it’s XML, but it could be anything

     

    Here is the New() method of the base class for all of my <T> return types (if that helps)

    An an example of a return type that extends the above…

    Here is an example of an actual request class calling the generic post method:

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.