Search code examples
phing

HttpRequestTask and https


Is it possible to perform request to https using http-request phing task?

If no - what workaround could you propose? wget?


Solution

  • Yes, you are not limited to HTTP only - HTTPS works fine.

    Examples are shown in the phing documentation:

    <http-request url="https://accounts.google.com/"/>
    

    Alternatively, you can use the curl adapter:

      <http-request url="https://accounts.google.com/" verbose="true">
        <config name="adapter" value="HTTP_Request2_Adapter_Curl"/>
      </http-request>