Autoit TIDRestFunctions

Last Updated:

Actions for REST request such as GET, PUT, POST, DELETE etc.

This keyword library provides REST Actions that can be used by all three DDE Drivers--CycleDriver, SuiteDriver, and StepDriver. That means they can be used in any keyword driven test tables regardless of the test tables level--Cycle, Suite, or Step.

Each different action has different parameters as described in its documentation. For reference, the first fields of ALL REST Action test records are defined below:

First Fields Description

Field #1
The "T" = Component Action record type specifier.
Field #2
The "SAFSREST" = Flag for REST action.
It can be
  • a literal string "SAFSREST"
  • a map item of any name given by user, but the value MUST be "SAFSREST", such as
    --------- Map file example -------
    [RestServiceTest]
    RestServiceTest=SAFSREST
    -----------------------------------
Field #3
The "SessionIDItem" = The map item storing the Session ID.
How to define SessionIDItem
The variable "SessionIDItem" can be defined in the map file under section [ApplicationConstant] or section specified by Field #2, examples as below:
--------- Map file example -------

#T, SAFSREST, SessionIDItem, RestAction
#For above test record, SessionIDItem can be defined under section "SAFSREST"
[SAFSREST]
SessionIDItem=UserAssignedSessionID
#Or SessionIDItem can be defined under section "ApplicationConstant"
[ApplicationConstant]
SessionIDItem=UserAssignedSessionID

#T, RestServiceTest, SessionIDItem, RestAction
#For above test record, SessionIDItem is defined under section "RestServiceTest"
[RestServiceTest]
RestServiceTest=SAFSREST
SessionIDItem=UserAssignedSessionID
#Or SessionIDItem can be defined under section "ApplicationConstant"
[ApplicationConstant]
SessionIDItem=UserAssignedSessionID

-----------------------------------

Notes of SessionIDItem
This ID is assigned by user, who needs to guarantee it is unique.
If the SessionIDItem is provided, the keyword RestStartServiceSession SHOULD be executed before executing each other action keyword, which will be handled within a session, within which:
1. The base URL is stored, and it will be prepended to a relative URI to form a full REST service URL.
2. The authentication information is also stored for later rest action execution.

Otherwise (no SessionIDItem is provided), it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information. The parameter relativeURI should be provided with a full-path URL

Field #4
The REST Action keyword.

Authentication/Authorization settings

Some REST service needs Authentication/Authorization before requesting.
It can be globally set via .ini configuration file or VM parameter as below:
  • .ini configuration file
    #The auth-config file should be assigned to key AUTH under section SAFS_REST
    [SAFS_REST]
    AUTH=config\auth2.xml

  • VM parameter
    #The auth-config file should be assigned to parameter safs.rest.auth
    java -Dsafs.rest.auth=config\auth2.xml aTest
It can also be set via keyword parameter as below:
T, SAFSREST, sessionIDItem, RestGetXML, relativeURI, responseIDVar [, body] [, headers] , config\auth2.xml
Auth setting via keyword parameter will only take effect during this keyword execution, and it will override the global auth setting.

Examples:

T, SAFSREST, sessionIDItem, RestStartServiceSession, baseURL [, authentication]
T, SAFSREST, sessionIDItem, RestGetXML, relativeURI, responseIDVar [, body] [, headers] [, authentication]
T, SAFSREST, sessionIDItem, RestEndServiceSession

Note:
REST Action parameters must be placed in the test record in the field position specified in the documentation. Some parameters are optional. However, the field associated with that parameter must be honored. If you wish to skip an optional parameter you must still provide an empty field for that parameter.



[How To Read This Reference]
RestDeleteCustom
TID
Perform the "DELETE" method on a REST service with headers defined by user.
RestEndServiceSession
TID
Stop a session for a REST service.
RestGetBinary
TID
Perform the "GET" method on a REST service, and try to get back the binary content.
RestGetCSS
TID
Perform the "GET" method on a REST service, and try to get back the css text content.
RestGetCustom
TID
Perform the "GET" method on a REST service with headers defined by user.
RestGetHTML
TID
Perform the "GET" method on a REST service, and try to get back the html text content.
RestGetImage
TID
Perform the "GET" method on a REST service, and try to get back the image content.
RestGetJSON
TID
Perform the "GET" method on a REST service, and try to get back the json text content.
RestGetScript
TID
Perform the "GET" method on a REST service, and try to get back the javascript text content.
RestGetText
TID
Perform the "GET" method on a REST service, and try to get back the plain text content.
RestGetXML
TID
Perform the "GET" method on a REST service, and try to get back the xml text content.
RestRequest
TID
Perform an HTTP method on a REST service.
RestStartServiceSession
TID
Start a session for a REST service.

Autoit TIDRestFunctions::RestDeleteCustom
TID

Perform the "DELETE" method on a REST service with headers defined by user.

This action will send the "DELETE" method with Headers defined by user.

If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.



Fields: [ ]=Optional with Default Value
  1. relativeURI
    The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

    This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

  2. responseIdVar
    The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

    The ID is generated internally, and it is used to get the Response Object from the internal Map.

  3. headers
    The headers to be included in this REST request.

    It can be
    1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
    2. a map item holding the literal-string or header-file-path.
    3. a project-relative-path or full-path to a file holding the literal header string.


  4. [ body = ]
    The body to send with this REST request.

    It can be
    1. a literal text string for something simple.
    2. a project-relative or full path to a file of larger body content in the proper format.
    The body's content-type could be defined in the headers.


  5. [ authentication = ]
    The custom authentication/authorization information.

    It can be
    • a project-relative-path or full-path to a file holding the authentication/authorization information.
    • a map item holding the auth-file-path.
    This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
    and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
    will still be taken in account if no custom auth information is specified.


Examples:
[How To Read This Reference]

Autoit TIDRestFunctions::RestEndServiceSession
TID

Stop a session for a REST service.

Stop a session for a REST service.

Fields: [ ]=Optional with Default Value
    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestGetBinary
    TID

    Perform the "GET" method on a REST service, and try to get back the binary content.

    This action will send the "GET" method with Headers containing "Accept : application/octet-stream". It only tells the server what type of content is expected, and it is not guarantee that the server will return it.

    If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
    Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information by keyword's parameter.



    Fields: [ ]=Optional with Default Value
    1. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

    2. responseIdVar
      The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

      The "response ID" is generated internally, and it is used to get the Response Object from the internal Map.

    3. [ body = ]
      The body to send with this REST request.

      It can be
      1. a literal text string for something simple.
      2. a project-relative or full path to a file of larger body content in the proper format.
      The body's content-type could be defined in the headers.


    4. [ headers = ]
      The headers to be included in this REST request.

      It can be
      1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      2. a map item holding the literal-string or header-file-path.
      3. a project-relative-path or full-path to a file holding the literal header string.


    5. [ authentication = ]
      The custom authentication/authorization information.

      It can be
      • a project-relative-path or full-path to a file holding the authentication/authorization information.
      • a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestGetCSS
    TID

    Perform the "GET" method on a REST service, and try to get back the css text content.

    This action will send the "GET" method with Headers containing "Accept : text/css". It only tells the server what type of content is expected, and it is not guarantee that the server will return it.

    If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
    Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.



    Fields: [ ]=Optional with Default Value
    1. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

    2. responseIdVar
      The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

      The ID is generated internally, and it is used to get the Response Object from the internal Map.

    3. [ body = ]
      The body to send with this REST request.

      It can be
      1. a literal text string for something simple.
      2. a project-relative or full path to a file of larger body content in the proper format.
      The body's content-type could be defined in the headers.


    4. [ headers = ]
      The headers to be included in this REST request.

      It can be
      1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      2. a map item holding the literal-string or header-file-path.
      3. a project-relative-path or full-path to a file holding the literal header string.


    5. [ authentication = ]
      The custom authentication/authorization information.

      It can be
      • a project-relative-path or full-path to a file holding the authentication/authorization information.
      • a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestGetCustom
    TID

    Perform the "GET" method on a REST service with headers defined by user.

    This action will send the "GET" method with Headers defined by user.

    If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
    Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.



    Fields: [ ]=Optional with Default Value
    1. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

    2. responseIdVar
      The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

      The ID is generated internally, and it is used to get the Response Object from the internal Map.

    3. headers
      The headers to be included in this REST request.

      It can be
      1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      2. a map item holding the literal-string or header-file-path.
      3. a project-relative-path or full-path to a file holding the literal header string.


    4. [ body = ]
      The body to send with this REST request.

      It can be
      1. a literal text string for something simple.
      2. a project-relative or full path to a file of larger body content in the proper format.
      The body's content-type could be defined in the headers.


    5. [ authentication = ]
      The custom authentication/authorization information.

      It can be
      • a project-relative-path or full-path to a file holding the authentication/authorization information.
      • a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestGetHTML
    TID

    Perform the "GET" method on a REST service, and try to get back the html text content.

    This action will send the "GET" method with Headers containing "Accept : text/html". It only tells the server what type of content is expected, and it is not guarantee that the server will return it.

    If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
    Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.



    Fields: [ ]=Optional with Default Value
    1. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

    2. responseIdVar
      The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

      The ID is generated internally, and it is used to get the Response Object from the internal Map.

    3. [ body = ]
      The body to send with this REST request.

      It can be
      1. a literal text string for something simple.
      2. a project-relative or full path to a file of larger body content in the proper format.
      The body's content-type could be defined in the headers.


    4. [ headers = ]
      The headers to be included in this REST request.

      It can be
      1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      2. a map item holding the literal-string or header-file-path.
      3. a project-relative-path or full-path to a file holding the literal header string.


    5. [ authentication = ]
      The custom authentication/authorization information.

      It can be
      • a project-relative-path or full-path to a file holding the authentication/authorization information.
      • a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestGetImage
    TID

    Perform the "GET" method on a REST service, and try to get back the image content.

    This action will send the "GET" method with Headers containing "Accept : image". It only tells the server what type of content is expected, and it is not guarantee that the server will return it.

    If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
    Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.



    Fields: [ ]=Optional with Default Value
    1. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

    2. responseIdVar
      The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

      The ID is generated internally, and it is used to get the Response Object from the internal Map.

    3. [ body = ]
      The body to send with this REST request.

      It can be
      1. a literal text string for something simple.
      2. a project-relative or full path to a file of larger body content in the proper format.
      The body's content-type could be defined in the headers.


    4. [ headers = ]
      The headers to be included in this REST request.

      It can be
      1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      2. a map item holding the literal-string or header-file-path.
      3. a project-relative-path or full-path to a file holding the literal header string.


    5. [ authentication = ]
      The custom authentication/authorization information.

      It can be
      • a project-relative-path or full-path to a file holding the authentication/authorization information.
      • a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestGetJSON
    TID

    Perform the "GET" method on a REST service, and try to get back the json text content.

    This action will send the "GET" method with Headers containing "Accept : application/json". It only tells the server what type of content is expected, and it is not guarantee that the server will return it.

    If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
    Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.



    Fields: [ ]=Optional with Default Value
    1. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

    2. responseIdVar
      The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

      The ID is generated internally, and it is used to get the Response Object from the internal Map.

    3. [ body = ]
      The body to send with this REST request.

      It can be
      1. a literal text string for something simple.
      2. a project-relative or full path to a file of larger body content in the proper format.
      The body's content-type could be defined in the headers.


    4. [ headers = ]
      The headers to be included in this REST request.

      It can be
      1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      2. a map item holding the literal-string or header-file-path.
      3. a project-relative-path or full-path to a file holding the literal header string.


    5. [ authentication = ]
      The custom authentication/authorization information.

      It can be
      • a project-relative-path or full-path to a file holding the authentication/authorization information.
      • a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestGetScript
    TID

    Perform the "GET" method on a REST service, and try to get back the javascript text content.

    This action will send the "GET" method with Headers containing "Accept : application/javascript". It only tells the server what type of content is expected, and it is not guarantee that the server will return it.

    If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
    Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.



    Fields: [ ]=Optional with Default Value
    1. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

    2. responseIdVar
      The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

      The ID is generated internally, and it is used to get the Response Object from the internal Map.

    3. [ body = ]
      The body to send with this REST request.

      It can be
      1. a literal text string for something simple.
      2. a project-relative or full path to a file of larger body content in the proper format.
      The body's content-type could be defined in the headers.


    4. [ headers = ]
      The headers to be included in this REST request.

      It can be
      1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      2. a map item holding the literal-string or header-file-path.
      3. a project-relative-path or full-path to a file holding the literal header string.


    5. [ authentication = ]
      The custom authentication/authorization information.

      It can be
      • a project-relative-path or full-path to a file holding the authentication/authorization information.
      • a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestGetText
    TID

    Perform the "GET" method on a REST service, and try to get back the plain text content.

    This action will send the "GET" method with Headers containing "Accept : text/plain". It only tells the server what type of content is expected, and it is not guarantee that the server will return it.

    If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
    Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.



    Fields: [ ]=Optional with Default Value
    1. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

    2. responseIdVar
      The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

      The ID is generated internally, and it is used to get the Response Object from the internal Map.

    3. [ body = ]
      The body to send with this REST request.

      It can be
      1. a literal text string for something simple.
      2. a project-relative or full path to a file of larger body content in the proper format.
      The body's content-type could be defined in the headers.


    4. [ headers = ]
      The headers to be included in this REST request.

      It can be
      1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      2. a map item holding the literal-string or header-file-path.
      3. a project-relative-path or full-path to a file holding the literal header string.


    5. [ authentication = ]
      The custom authentication/authorization information.

      It can be
      • a project-relative-path or full-path to a file holding the authentication/authorization information.
      • a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestGetXML
    TID

    Perform the "GET" method on a REST service, and try to get back the xml text content.

    This action will send the "GET" method with Headers containing "Accept : text/xml". It only tells the server what type of content is expected, and it is not guarantee that the server will return it.

    If the field SessionIDItem is provided in the map, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session.
    Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.



    Fields: [ ]=Optional with Default Value
    1. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI (the base-URL is provided in a session). BUT it should be full path URL if the field SessionIDItem is not provided or invalid.

    2. responseIdVar
      The name of the variable holding "response ID", which is used by rest driver commands to verify/delete response.

      The ID is generated internally, and it is used to get the Response Object from the internal Map.

    3. [ body = ]
      The body to send with this REST request.

      It can be
      1. a literal text string for something simple.
      2. a project-relative or full path to a file of larger body content in the proper format.
      The body's content-type could be defined in the headers.


    4. [ headers = ]
      The headers to be included in this REST request.

      It can be
      1. a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      2. a map item holding the literal-string or header-file-path.
      3. a project-relative-path or full-path to a file holding the literal header string.


    5. [ authentication = ]
      The custom authentication/authorization information.

      It can be
      • a project-relative-path or full-path to a file holding the authentication/authorization information.
      • a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect only in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestRequest
    TID

    Perform an HTTP method on a REST service.

    If the test field SessionIDItem is provided, the keyword RestStartServiceSession SHOULD be executed before executing this action, which will be handled within a session. Otherwise, it will be considered as a one-shot connection, and NO RestStartServiceSession needs to be called and user may need to provide authentication information.

    Fields: [ ]=Optional with Default Value
    1. HTTPMethod
      The HTTP method to execute.

      It can be one of "GET" "DELETE" "POST" "PUT" "PATCH" "HEAD".

    2. relativeURI
      The relative URI combined with a base-URL (stored in a session) to form a REST service URL.

      This is normally a relative URI as the base-URL is provided in a session. BUT it should be full path URL if the parameter sessionID is not provided.

    3. responseIdVar
      The name of the variable holding the ID (generated internally), which is used to get the Response Object from the internal Map.


    4. [ body = ]
      The body to send with this REST request.

      The body could be a literal text string for something simple. The body could also be a project-relative or full path to a file of larger body content in the proper format.

    5. [ headers = ]
      The headers to be included in this REST request.

      It can be a literal string, such as "If-Modified-Since: Sat, 29 OCT 1994 19:43:31 GMT".
      It can also be a project-relative-path or full-path to a file holding the literal header string.
      It can also be a map item holding the literal-string or header-file-path.


    6. [ authentication = ]
      The custom authentication/authorization information.

      It can be a project-relative-path or full-path to a file holding the authentication/authorization information.
      It can also be a map item holding the auth-file-path.
      This custom authentication/authorization information will override the global settings (in .ini file or by VM parameter.)
      and take effect in this keyword execution. In the next keyword execution, the global authentication/authorization setting
      will still be taken in account if no custom auth information is specified.


    Examples:
    [How To Read This Reference]

    Autoit TIDRestFunctions::RestStartServiceSession
    TID

    Start a session for a REST service.

    Currently the "base URL" and "authentication information" will be stored for the opened session.



    Fields: [ ]=Optional with Default Value
    1. baseURL
      The base URL to be stored with a session.

      This base URL will be prepended to a relative URI to form a REST service URL for the later invocation of other REST actions.

    2. [ authentication = ]
      The file holding authentication information to be used during this session.

      Normally, the authentication information will be loaded from "JVM -D parameters", "Map", or global external file, those settings are considered to be global. This parameter can be used to alternate the authentication information, it will override the global settings.
      It is normally provided as a file name holding the authentication information. The file is relative to the project's root directory, and it can contain sub directories.
      If it is provided as NOAUTHENTICATION, then no authentication is needed during the session even the global settings are set.


    Examples:
    [How To Read This Reference]