<?xml version="1.0" encoding="UTF-8"?>
<keywordspec format="ROBOT" type="LIBRARY" generated="2020-09-17T10:13:01Z" scope="GLOBAL" name="HttpRequestLibrary" specversion="2" namedargs="true">
<version></version>
<scope>global</scope>
<namedargs>yes</namedargs>
<doc>``HttpRequestLibrary`` is a [http://code.google.com/p/robotframework/|Robot Framework] test library that uses the [https://hc.apache.org/index.html|Apache HTTP client].</doc>
<kw name="Create Digest Session">
<arguments>
<arg>alias</arg>
<arg>url</arg>
<arg>headers=</arg>
<arg>cookies=</arg>
<arg>auth=</arg>
<arg>timeout=0</arg>
<arg>proxy=</arg>
<arg>verify=False</arg>
<arg>debug=False</arg>
</arguments>
<doc>Create a HTTP session to a server

``url`` Base url of the server

``alias`` Robot Framework alias to identify the session

``headers`` Dictionary of default headers

``auth`` List of username &amp; password for HTTP Digest Auth

``timeout`` Connection timeout



``proxy`` Dictionary that contains proxy information. Only one proxy supported per session. Dictionary should contain at least following keys: *protocol*, *host* and *port* of proxy. It can also contain *username* and *password*

``verify`` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.

``debug`` Enable http verbosity option more information. Note that this is not bound to session, but for the state of system. So if another session with debug=False is created, the earlier with debug=True is not printing debug from HTTPclient anymore</doc>
</kw>
<kw name="Create Session">
<arguments>
<arg>alias</arg>
<arg>url</arg>
<arg>headers=</arg>
<arg>cookies=</arg>
<arg>auth=</arg>
<arg>timeout=0</arg>
<arg>proxy=</arg>
<arg>verify=False</arg>
<arg>debug=False</arg>
</arguments>
<doc>Create a HTTP session to a server

``url`` Base url of the server

``alias`` Robot Framework alias to identify the session

``headers`` Dictionary of default headers

``auth`` List of username &amp; password for HTTP Basic Auth

``timeout`` Connection timeout



``proxy`` Dictionary that contains proxy information. Only one proxy supported per session. Dictionary should contain at least following keys: *protocol*, *host* and *port* of proxy. It can also contain *username* and *password*

``verify`` Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided.

``debug`` Enable http verbosity option more information. Note that this is not bound to session, but for the state of system. So if another session with debug=False is created, the earlier with debug=True is not printing debug from HTTPclient anymore</doc>
</kw>
<kw name="Delete Request">
<arguments>
<arg>alias</arg>
<arg>uri</arg>
<arg>data=''</arg>
<arg>params=</arg>
<arg>headers=</arg>
<arg>allow_redirects=True</arg>
<arg>timeout=0</arg>
</arguments>
<doc> Send a DELETE request on the session object found using the

given `alias`

``alias`` that will be used to identify the Session object in the cache

``uri`` to send the DELETE request to

``data`` a dictionary of key-value pairs that will be urlencoded and sent as DELETE data or binary data that is sent as the raw body content

``params`` url parameters to append to the uri

``headers`` a dictionary of headers to use with the request



``allow_redirects`` Boolean. Set to False if redirect following is not allowed.

``timeout`` connection timeout</doc>
</kw>
<kw name="Get Json Response">
<arguments>
<arg>alias</arg>
</arguments>
<doc>Gets latest response in JSON format from given alias.</doc>
</kw>
<kw name="Get Request">
<arguments>
<arg>alias</arg>
<arg>uri</arg>
<arg>headers=</arg>
<arg>params=</arg>
<arg>allow_redirects=True</arg>
<arg>timeout=0</arg>
</arguments>
<doc> Send a GET request on the session object found using the

given `alias`

``alias`` that will be used to identify the Session object in the cache

``uri`` to send the GET request to

``params`` url parameters to append to the uri

``headers`` a dictionary of headers to use with the request



``allow_redirects`` Boolean. Set to False if redirect following is not allowed.

``timeout`` connection timeout</doc>
</kw>
<kw name="Get Response Status Code">
<arguments>
<arg>alias</arg>
</arguments>
<doc>Returns HTTP status code of latest response for given alias.</doc>
</kw>
<kw name="Head Request">
<arguments>
<arg>alias</arg>
<arg>uri</arg>
<arg>headers=</arg>
<arg>allow_redirects=False</arg>
<arg>timeout=0</arg>
</arguments>
<doc> Send a HEAD request on the session object found using the

given `alias`

``alias`` that will be used to identify the Session object in the cache

``uri`` to send the HEAD request to

``headers`` a dictionary of headers to use with the request



``allow_redirects`` Boolean. Set to True if redirect following is allowed.

``timeout`` connection timeout</doc>
</kw>
<kw name="Options Request">
<arguments>
<arg>alias</arg>
<arg>uri</arg>
<arg>headers=</arg>
<arg>allow_redirects=True</arg>
<arg>timeout=0</arg>
</arguments>
<doc> Send a OPTIONS request on the session object found using the

given `alias`

``alias`` that will be used to identify the Session object in the cache

``uri`` to send the OPTIONS request to

``headers`` a dictionary of headers to use with the request



``allow_redirects`` Boolean. Set to False if redirect following is not allowed.

``timeout`` connection timeout</doc>
</kw>
<kw name="Patch Request">
<arguments>
<arg>alias</arg>
<arg>uri</arg>
<arg>data=</arg>
<arg>headers=</arg>
<arg>files=</arg>
<arg>allow_redirects=True</arg>
<arg>timeout=0</arg>
</arguments>
<doc> Send a PATCH request on the session object found using the

given `alias`

``alias`` that will be used to identify the Session object in the cache

``uri`` to send the PATCH request to

``data`` a dictionary of key-value pairs that will be urlencoded and sent as PATCH data or binary data that is sent as the raw body content

``headers`` a dictionary of headers to use with the request

``files`` a dictionary of file names containing file data to PATCH to the server



``allow_redirects`` Boolean. Set to False if redirect following is not allowed.

``timeout`` connection timeout</doc>
</kw>
<kw name="Post Request">
<arguments>
<arg>alias</arg>
<arg>uri</arg>
<arg>data=''</arg>
<arg>params=</arg>
<arg>headers=</arg>
<arg>files=</arg>
<arg>allow_redirects=True</arg>
<arg>timeout=0</arg>
</arguments>
<doc> Send a POST request on the session object found using the

given `alias`

``alias`` that will be used to identify the Session object in the cache

``uri`` to send the POST request to

``data`` a dictionary of key-value pairs that will be urlencoded and sent as POST data or binary data that is sent as the raw body content

``params`` url parameters to append to the uri

``headers`` a dictionary of headers to use with the request

``files`` a dictionary of file names containing file data to POST to the server



``allow_redirects`` Boolean. Set to False if redirect following is not allowed.

``timeout`` connection timeout</doc>
</kw>
<kw name="Pretty Print Json">
<arguments>
<arg>content</arg>
</arguments>
<doc>Prints out given string as pretty printed JSON.</doc>
</kw>
<kw name="Put Request">
<arguments>
<arg>alias</arg>
<arg>uri</arg>
<arg>data=''</arg>
<arg>params=</arg>
<arg>headers=</arg>
<arg>files=</arg>
<arg>allow_redirects=True</arg>
<arg>timeout=0</arg>
</arguments>
<doc> Send a PUT request on the session object found using the

given `alias`

``alias`` that will be used to identify the Session object in the cache

``uri`` to send the PUT request to

``data`` a dictionary of key-value pairs that will be urlencoded and sent as PUT data or binary data that is sent as the raw body content

``params`` url parameters to append to the uri

``headers`` a dictionary of headers to use with the request

``files`` a dictionary of file names containing file data to PUT to the server



``allow_redirects`` Boolean. Set to False if redirect following is not allowed.

``timeout`` connection timeout</doc>
</kw>
<kw name="Response Code Should Be">
<arguments>
<arg>alias</arg>
<arg>expected HTTP status code</arg>
</arguments>
<doc>Compares status code from latest response from given connection with given expected value.</doc>
</kw>
<kw name="Response Should Contain">
<arguments>
<arg>alias</arg>
<arg>expected content</arg>
<arg>case_sensitive=False</arg>
</arguments>
<doc>Checks that latest response from given connection contains given expected value. Default check is case sensitive.</doc>
</kw>
<kw name="To Json">
<arguments>
<arg>content</arg>
</arguments>
<doc>Convert a string to a JSON object.</doc>
</kw>
</keywordspec>
