Curl 指令用法

    線上教學

     

    Options in the integration with Shell

    CURL_CMD="curl"
    CURL_OPT="-qSfs -m 60"
    CURL_OPT_POST="-qSfs -m 60 -X POST"
    

    POST Request

    Send an Empty POST Request

    curl -X POST https://catonmat.net
    

    Send a POST Request with Form Data

    curl -d 'login=emma&password=123' -X POST https://google.com/login
    

    GET Request

    Send a GET Request and Print the Response to Screen

    curl https://catonmat.net/api?a=1&b=2
    

    Send a GET Request and Save the Response to a File

    curl -o response.txt https://catonmat.net/api?a=1&b=2
    
    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core