Skip to content

Httpclient

flowtask.components.HTTPClient

Basic HTTP Connection Request.

Example:

HTTPClient:
  Group: ICIMSDownload
  url: https://api.icims.com/customers/{customer_id}/forms/{form_data_id}.txt
  customer_id: '5674'
  form_data_id: '1731'
  form_id: '1823'
  associate_id: '518491'
  auth_type: basic
  use_proxy: false
  use_async: true
  credentials:
    username: ICIMS_API_USERNAME
    password: ICIMS_API_PASSWORD
  as_dataframe: false
  download: true
  timeout: 360
  destination:
    directory: /home/ubuntu/symbits/icims/files/forms/{associate_id}/
    filename: '{form_id}_{filename}.html'
    overwrite: false
  no_errors:
    '403':
      errorMessage: This form has been disabled
      errorCode: 3

HTTPClient

HTTPClient(loop=None, job=None, stat=None, **kwargs)

Bases: DownloadFromBase, HTTPService

HTTPClient.

Overview

   UserComponent: (abstract) ->

.. table:: Properties :widths: auto

+-----------+----------+-----------+----------------------------------------------+ | Name | Required | Summary | +-----------+----------+-----------+----------------------------------------------+ | start | Yes | It is executed when the component is "initialized", | | | | it MUST return TRUE if it does not fail | +-----------+----------+-----------+----------------------------------------------+ | run | Yes | Is the code that will execute the component ,must return TRUE or | | | | a content if it does not fail, but fails is declared | +-----------+----------+-----------+-----------------------------------------------+ | close | Yes | It is used for any cleaning operation | +-----------+----------+-----------+-----------------------------------------------+

Return the list of arbitrary days

evaluate_error async

evaluate_error(response, message)

evaluate_response.

Check Response status and available payloads. Args: response (type): description url (str): description

Returns:

Name Type Description
tuple tuple

description

run async

run()

Executes the HTTPClient component, handling multiple URLs if provided.

:return: The result of the HTTP request(s).

start async

start(**kwargs)

Initializes the HTTPClient component, including fetching proxies if necessary.

:param kwargs: Additional keyword arguments. :return: True if initialization is successful.

var_replacement

var_replacement()

Replaces variables in the arguments with their corresponding values.