In workflows

This provider can be used in workflows.

As “step” to query data, example:

steps:
    - name: Query http
      provider: http
      config: "{{ provider.my_provider_name }}"
      with:
        url: {value}
        method: {value}
        headers: {value}
        body: {value}
        params: {value}
        proxies: {value}
        fail_on_error: {value}
        verify: {value}

As “action” to make changes or update data, example:

actions:
    - name: Query http
      provider: http
      config: "{{ provider.my_provider_name }}"
      with:
        url: {value}
        method: {value}
        headers: {value}
        body: {value}
        params: {value}
        proxies: {value}
        verify: {value}

Check the following workflow examples:

Connecting with the Provider

To connect to the provider, you can instantiate an instance of the HttpProvider class, providing a provider_id and a ProviderConfig object. Then you can call the query method to query the HTTP endpoint.

Notes

The code logs some debug information about the requests being sent, including the request headers, body, and query parameters. This information should not contain sensitive information, but it’s important to make sure of that before using this provider in production.