cURL Options - Return HTTP Response Code

Idea created by databuzz on Jun 15, 2018
    Active
    Score14

    When using the Insert from URL script step and the supported cURL options it is helpful to review the HTTP Response Code to confirm whether the request was processed successfully. Currently FileMaker Pro v16/17 doesn't support the -w option:

     

    curl - How To Use

     

    which would allow you to get the last response code using syntax like this:

     

    -w "%{http_code}"
    

     

    You can use the cURL option:

     

    " --dump-header $responseHeaders"

     

    to get the response headers which contain all the response codes and you can use FileMaker text functions to locate the last response code amongst all the response header text, but it would be much simpler and more reliable to request this be returned to a FileMaker variable as part of specify the cURL options.

     

    The open source BaseElements plugin provides a function for this:

     

    BE_HTTP_Response_Code – BaseElements Plugin Help Centre

     

    We're looking for the equivalent of this as a native supported cURL option.