post https - script

Discussion in 'Mac Programming' started by hank moody, Jan 19, 2015.

  1. hank moody macrumors 6502a

    hank moody

    Jan 18, 2015
    hi, im not a programmer but maybe someone would help me.

    i want to make a simple script (bash script?) that everytime i click in it, it makes a POST HTTPS Request to the https://xxxxxxx.xml with some parameters (ex.: "backup finished") in the body of the request. And then, receive de response to "response.xml".

    It's possible?

    Thank you
  2. D.T. macrumors 604


    Sep 15, 2011
    Vilano Beach, FL
    I’d probably use cURL (maybe wrapped up in a script).

    => curl --data "param1=value1&param2=value2" http://host/path

    You can pass in auth creds, custom headers, etc. I’d probably wind up using Python or Ruby to do it, easily write out (and potentially parse) the return value.

Share This Page