# RequestsLibrary

**URL:** https://forum.robotframework.org/c/libraries/requests/17.md

[Latest](https://forum.robotframework.org/latest.md) · [Categories](https://forum.robotframework.org/categories.md)

---

## [About the RequestsLibrary category](https://forum.robotframework.org/t/about-the-requestslibrary-category/32)

<div class="topic-metadata">

**Author:** [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Replies:** 0

</div>

robotframework-requests

---

## [Comparing JSON array responses from 2 different get apis with mapper logic](https://forum.robotframework.org/t/comparing-json-array-responses-from-2-different-get-apis-with-mapper-logic/5499)

<div class="topic-metadata">

**Author:** [@rahul.d](https://forum.robotframework.org/u/rahul.d)\
**Replies:** 7\
**Last updated:** [29 April 2026 13:47 UTC](https://forum.robotframework.org/t/comparing-json-array-responses-from-2-different-get-apis-with-mapper-logic/5499 "2026-04-29T13:47:19Z")

</div>

I have Json arrays from 2 different APIs For Example 1 https://test1.com/api 2 https://test2.com/api Now below is array response that i have for both the APIs 1. “resposne1”:\[ { “name”: “Speed1”, “number”: “1017…

---

## [SSL/TLS Certificate error with POST request using SOAP web service](https://forum.robotframework.org/t/ssl-tls-certificate-error-with-post-request-using-soap-web-service/9074)

<div class="topic-metadata">

**Author:** [@Pushpinder](https://forum.robotframework.org/u/Pushpinder)\
**Replies:** 5\
**Last updated:** [16 July 2025 14:58 UTC](https://forum.robotframework.org/t/ssl-tls-certificate-error-with-post-request-using-soap-web-service/9074 "2025-07-16T14:58:55Z")

</div>

I am new to Robot FW and trying to make a POST request to an internal SOAP service (.Net based WCF Service) using username and password. I am getting an error related to SSL certificate like this SSLError: HTTPSConnecti…

---

## [Automate post api by uploading (xlsx or csv or xml file) via robotFramework](https://forum.robotframework.org/t/automate-post-api-by-uploading-xlsx-or-csv-or-xml-file-via-robotframework/5704)

<div class="topic-metadata">

**Author:** [@mgrissa94](https://forum.robotframework.org/u/mgrissa94)\
**Replies:** 4\
**Last updated:** [15 May 2025 14:37 UTC](https://forum.robotframework.org/t/automate-post-api-by-uploading-xlsx-or-csv-or-xml-file-via-robotframework/5704 "2025-05-15T14:37:09Z")

</div>

I am getting a HTTPError: 400 Client Error: Bad Request for url ; when I run the following robot test case which aims to automate POST api. I have no issue when I run the api via postman by uploading an xlsx file in the …

---

## [Issue with Multipart Form-Data in Robot Framework (Large File + Form Fields)](https://forum.robotframework.org/t/issue-with-multipart-form-data-in-robot-framework-large-file-form-fields/8779)

<div class="topic-metadata">

**Author:** [@astrowalker2013](https://forum.robotframework.org/u/astrowalker2013)\
**Replies:** 1\
**Last updated:** [23 April 2025 11:38 UTC](https://forum.robotframework.org/t/issue-with-multipart-form-data-in-robot-framework-large-file-form-fields/8779 "2025-04-23T11:38:34Z")

</div>

ello everyone, I’m encountering an issue with sending multipart/form-data requests in Robot Framework 7.0.1 using the latest version of RequestsLibrary. The problem occurs when the request includes both a large file and…

---

## [GET - Response returns "Bad request 400" error](https://forum.robotframework.org/t/get-response-returns-bad-request-400-error/8792)

<div class="topic-metadata">

**Author:** [@Majo133](https://forum.robotframework.org/u/Majo133)\
**Replies:** 1\
**Last updated:** [21 April 2025 16:26 UTC](https://forum.robotframework.org/t/get-response-returns-bad-request-400-error/8792 "2025-04-21T16:26:05Z")

</div>

Hey there, i am trying to call a simple GET request, while passing “Header” attributes to the GET request. Without the “Header” attributes" i was getting “Forbidden 403” error. Anyway, i am not able to somehow get a cor…

---

## [Facing Issue with testing File Upload API using robot framework](https://forum.robotframework.org/t/facing-issue-with-testing-file-upload-api-using-robot-framework/254)

<div class="topic-metadata">

**Author:** [@SuperSonic](https://forum.robotframework.org/u/SuperSonic)\
**Replies:** 18\
**Last updated:** [24 February 2025 10:14 UTC](https://forum.robotframework.org/t/facing-issue-with-testing-file-upload-api-using-robot-framework/254 "2025-02-24T10:14:39Z")

</div>

I am very new to testing / developing. I am currently testing a REST API. In Postman I send a POST request by specifying parameters and uploading a file using form-data in the body. My request always succeeds in postman.…

---

## [Last response keyword cannot be found](https://forum.robotframework.org/t/last-response-keyword-cannot-be-found/8367)

<div class="topic-metadata">

**Author:** [@mohdl99](https://forum.robotframework.org/u/mohdl99)\
**Replies:** 4\
**Last updated:** [31 January 2025 13:57 UTC](https://forum.robotframework.org/t/last-response-keyword-cannot-be-found/8367 "2025-01-31T13:57:58Z")

</div>

Hi all, I have found this keyword Last response in the documentation of the RequestsLibrary https://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html#Last%20response but it couldn’t run on my mac…

---

## [Additional Headers in PUT Request](https://forum.robotframework.org/t/additional-headers-in-put-request/8162)

<div class="topic-metadata">

**Author:** [@TomekWro](https://forum.robotframework.org/u/TomekWro)\
**Replies:** 4\
**Last updated:** [5 January 2025 10:02 UTC](https://forum.robotframework.org/t/additional-headers-in-put-request/8162 "2025-01-05T10:02:51Z")

</div>

Hello, I’m automating Api Requests with RequestsLibrary and noticed additional headers in logs when using PUT: headers={'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '\*/\*', 'Con…

---

## [How to add pdf file to multipart request including other parameters](https://forum.robotframework.org/t/how-to-add-pdf-file-to-multipart-request-including-other-parameters/7680)

<div class="topic-metadata">

**Author:** [@phjfranssen](https://forum.robotframework.org/u/phjfranssen)\
**Replies:** 1\
**Last updated:** [7 August 2024 21:23 UTC](https://forum.robotframework.org/t/how-to-add-pdf-file-to-multipart-request-including-other-parameters/7680 "2024-08-07T21:23:53Z")

</div>

Hi all, I’m trying to perform a multipart post request in robotframework. I’ve managed to get it working for the first four parameters (all plain text) however I’m having difficulties attaching a PDF file as the final f…

---

## [RequestLibrary Post On session fail with "is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8."vs Post request pass](https://forum.robotframework.org/t/requestlibrary-post-on-session-fail-with-is-not-valid-latin-1-use-body-encode-utf-8-if-you-want-to-send-it-encoded-in-utf-8-vs-post-request-pass/7666)

<div class="topic-metadata">

**Author:** [@skoroghly](https://forum.robotframework.org/u/skoroghly)\
**Replies:** 3\
**Last updated:** [7 August 2024 08:55 UTC](https://forum.robotframework.org/t/requestlibrary-post-on-session-fail-with-is-not-valid-latin-1-use-body-encode-utf-8-if-you-want-to-send-it-encoded-in-utf-8-vs-post-request-pass/7666 "2024-08-07T08:55:11Z")

</div>

RequestLibrary Post On session fail with "is not valid Latin-1. Use body.encode(‘utf-8’) if you want to send it encoded in UTF-8."vs Post request pass POST API \[Arguments\] ${ENDPOINT} ${json} ${expected\_status} …

---

## [Hello all, I am currently running API automation By Robot Framework and am required to pass my API Key as well](https://forum.robotframework.org/t/hello-all-i-am-currently-running-api-automation-by-robot-framework-and-am-required-to-pass-my-api-key-as-well/7503)

<div class="topic-metadata">

**Author:** [@abinashbeura-eaton](https://forum.robotframework.org/u/abinashbeura-eaton)\
**Replies:** 1\
**Last updated:** [2 July 2024 11:40 UTC](https://forum.robotframework.org/t/hello-all-i-am-currently-running-api-automation-by-robot-framework-and-am-required-to-pass-my-api-key-as-well/7503 "2024-07-02T11:40:16Z")

</div>

Logged in as PXWhite user @{auth} Create List ${User\_Name} ${Password} Create Session PxWhiteSession ${Base\_Url} auth=${auth} ${Header} Create Dictionary api-key=${api\_Keys} Co…

---

## [How to pass API Key when using POST/GET](https://forum.robotframework.org/t/how-to-pass-api-key-when-using-post-get/1317)

<div class="topic-metadata">

**Author:** [@Beau-Sof](https://forum.robotframework.org/u/Beau-Sof)\
**Replies:** 5\
**Last updated:** [2 July 2024 04:49 UTC](https://forum.robotframework.org/t/how-to-pass-api-key-when-using-post-get/1317 "2024-07-02T04:49:13Z")

</div>

Hello all, I am currently running API automation and am required to pass my API Key as well. I am thinking I need to add this to my header EX: header={“x-apikey” : ‘key’} But I have tried this in numerous ways and it …

---

## [InsecureRequestWarning: Unverified HTTPS request is being made to host](https://forum.robotframework.org/t/insecurerequestwarning-unverified-https-request-is-being-made-to-host/7442)

<div class="topic-metadata">

**Author:** [@ajaybodake](https://forum.robotframework.org/u/ajaybodake)\
**Replies:** 1\
**Last updated:** [18 June 2024 10:17 UTC](https://forum.robotframework.org/t/insecurerequestwarning-unverified-https-request-is-being-made-to-host/7442 "2024-06-18T10:17:22Z")

</div>

trying to execute POST method but getting error robot -d results .\\APIs\\TC1\_GET\_Request.robot TC1 GET Request Get\_User\_Info .C:\\Users\\Dell\\AppData\\Local\\Programs\\P…

---

## [I am getting error 400 on automating POST API with file upload(string($binary))ad(](https://forum.robotframework.org/t/i-am-getting-error-400-on-automating-post-api-with-file-upload-string-binary-ad/6182)

<div class="topic-metadata">

**Author:** [@UITester](https://forum.robotframework.org/u/UITester)\
**Replies:** 10\
**Last updated:** [5 June 2024 08:34 UTC](https://forum.robotframework.org/t/i-am-getting-error-400-on-automating-post-api-with-file-upload-string-binary-ad/6182 "2024-06-05T08:34:14Z")

</div>

---

## [How to upload a photo using post request and form data?](https://forum.robotframework.org/t/how-to-upload-a-photo-using-post-request-and-form-data/7038)

<div class="topic-metadata">

**Author:** [@oconnorsr](https://forum.robotframework.org/u/oconnorsr)\
**Replies:** 5\
**Last updated:** [9 April 2024 08:53 UTC](https://forum.robotframework.org/t/how-to-upload-a-photo-using-post-request-and-form-data/7038 "2024-04-09T08:53:46Z")

</div>

Hello, I am having an issue with uploading an image using Post and Form Data. Robot Framework Code: \*\*\* Settings \*\*\* Resource …/…/…/resource/main.resource \*\*\* Keywords \*\*\* POST api/v3/image/ \[Arguments\] ${pa…

---

## [How to do Basic Auth with base64?](https://forum.robotframework.org/t/how-to-do-basic-auth-with-base64/6997)

<div class="topic-metadata">

**Author:** [@Vitaly](https://forum.robotframework.org/u/Vitaly)\
**Replies:** 3\
**Last updated:** [14 March 2024 10:14 UTC](https://forum.robotframework.org/t/how-to-do-basic-auth-with-base64/6997 "2024-03-14T10:14:57Z")

</div>

Hi! I am trying to create a post request for Basic Auth. I tried next: ${UserPassword} Create Dictionary username=${usernameEXT} password=${passwordEXT} Create Session MySession http://111.11.11…

---

## [Uploading files with auth](https://forum.robotframework.org/t/uploading-files-with-auth/6850)

<div class="topic-metadata">

**Author:** [@Vitaly](https://forum.robotframework.org/u/Vitaly)\
**Replies:** 6\
**Last updated:** [21 February 2024 17:59 UTC](https://forum.robotframework.org/t/uploading-files-with-auth/6850 "2024-02-21T17:59:59Z")

</div>

Hi! I am learning on how to upload files to my database. ${UserAndPassword} Create Dictionary username=Name password=Password ${response} POST url=site.com/authorize json=${UserAndPassword} #I…

---

## [Requests library - Masking API key](https://forum.robotframework.org/t/requests-library-masking-api-key/6710)

<div class="topic-metadata">

**Author:** [@Recodi](https://forum.robotframework.org/u/Recodi)\
**Replies:** 2\
**Last updated:** [26 January 2024 10:18 UTC](https://forum.robotframework.org/t/requests-library-masking-api-key/6710 "2024-01-26T10:18:32Z")

</div>

Hello, I’m trying to find a solution on how to mask the e.g. an API key from the output files that RF generates (output.xml, log.html, report.html). By default, RF logs the password in text to the output files, I disco…

---

## [AttributeError: 'str' object has no attribute 'copy'](https://forum.robotframework.org/t/attributeerror-str-object-has-no-attribute-copy/2264)

<div class="topic-metadata">

**Author:** [@Centaure13](https://forum.robotframework.org/u/Centaure13)\
**Replies:** 15\
**Last updated:** [21 January 2024 10:34 UTC](https://forum.robotframework.org/t/attributeerror-str-object-has-no-attribute-copy/2264 "2024-01-21T10:34:18Z")

</div>

Hello, I try to execute my RF test using RequestsLibrary but it doesn’t work anymore (I have changed my computer so perhaps there is something which is missing because it worked fine before…) Here is my code ${header}…

---

## [RequestLibrary : Post On session vs Post request](https://forum.robotframework.org/t/requestlibrary-post-on-session-vs-post-request/1800)

<div class="topic-metadata">

**Author:** [@Centaure13](https://forum.robotframework.org/u/Centaure13)\
**Replies:** 10\
**Last updated:** [5 October 2021 10:13 UTC](https://forum.robotframework.org/t/requestlibrary-post-on-session-vs-post-request/1800 "2021-10-05T10:13:18Z")

</div>

Hello, I have some issues with the new requestlibrary version (0.9.1). Here is my former code (with the 0.7.1 version) which works fine : ${header}= Create Dictionary Content-Type=application/json;charset=utf-8 …

---

## [Rest API session persistence](https://forum.robotframework.org/t/rest-api-session-persistence/6543)

<div class="topic-metadata">

**Author:** [@Shankar1994](https://forum.robotframework.org/u/Shankar1994)\
**Replies:** 3\
**Last updated:** [11 December 2023 17:53 UTC](https://forum.robotframework.org/t/rest-api-session-persistence/6543 "2023-12-11T17:53:12Z")

</div>

Hi Everyone, I’m facing one issue while running request library of framework. I’m trying to GET request to one of our controller and we are saving our SESSION and the same SESSION we are using while doing POST request…

---

## [GET method give OSError: \[WinError 6\] The handle is invalid](https://forum.robotframework.org/t/get-method-give-oserror-winerror-6-the-handle-is-invalid/6496)

<div class="topic-metadata">

**Author:** [@JariTynkkynen](https://forum.robotframework.org/u/JariTynkkynen)\
**Replies:** 5\
**Last updated:** [21 November 2023 11:34 UTC](https://forum.robotframework.org/t/get-method-give-oserror-winerror-6-the-handle-is-invalid/6496 "2023-11-21T11:34:51Z")

</div>

Hi all, I have a problem with requestLibrary get method, it return OSError: \[WinError 6\] The handle is invalid error message. I have Robot Framework 6.1.1 (Python 3.9.13 on win32). Do anybody know how this can be fixed? …

---

## [Api request - form data body](https://forum.robotframework.org/t/api-request-form-data-body/5597)

<div class="topic-metadata">

**Author:** [@KGhonim](https://forum.robotframework.org/u/KGhonim)\
**Replies:** 3\
**Last updated:** [8 October 2023 12:50 UTC](https://forum.robotframework.org/t/api-request-form-data-body/5597 "2023-10-08T12:50:03Z")

</div>

i need your support please , i am trying to write test case for api request in a data-driven style as below details data file is .csv request body : form data where keys ( entity , content ) entity key is atext and c…

---

## [InvalidURL: Failed to parse: https://sdc-edifhirxpr:18088 headers=/oauth/token](https://forum.robotframework.org/t/invalidurl-failed-to-parse-https-sdc-edifhirxpr-18088-headers-oauth-token/6230)

<div class="topic-metadata">

**Author:** [@mrey2](https://forum.robotframework.org/u/mrey2)\
**Replies:** 6\
**Last updated:** [22 September 2023 09:48 UTC](https://forum.robotframework.org/t/invalidurl-failed-to-parse-https-sdc-edifhirxpr-18088-headers-oauth-token/6230 "2023-09-22T09:48:36Z")

</div>

i am trying to get a token with a post on session. i have it formatted correctly ${auth\_data}= Create Dictionary client\_id=${CLIENTID} client\_secret=${CLIENT\_SECRET} headers=${header} grant\_type=client\_credential…

---

## [How to upload image using post request and pass it as a parameter?](https://forum.robotframework.org/t/how-to-upload-image-using-post-request-and-pass-it-as-a-parameter/3470)

<div class="topic-metadata">

**Author:** [@Akashp](https://forum.robotframework.org/u/Akashp)\
**Replies:** 7\
**Last updated:** [8 September 2023 03:08 UTC](https://forum.robotframework.org/t/how-to-upload-image-using-post-request-and-pass-it-as-a-parameter/3470 "2023-09-08T03:08:48Z")

</div>

---

## [Unable to Upload Images Using RequestsLibrary](https://forum.robotframework.org/t/unable-to-upload-images-using-requestslibrary/6152)

<div class="topic-metadata">

**Author:** [@karlo.wilfredo](https://forum.robotframework.org/u/karlo.wilfredo)\
**Replies:** 2\
**Last updated:** [6 September 2023 23:04 UTC](https://forum.robotframework.org/t/unable-to-upload-images-using-requestslibrary/6152 "2023-09-06T23:04:33Z")

</div>

I’m trying to upload files thru API. Here’s the test: Verify Updating Property Media and Text \[Tags\] ## Add Property Media & Text ${id} Get File ${CURDIR}\\resources\\sales\_property\_id.txt ${params} Create D…

---

## [Robotframework RequestsLibrary SSLV3\_ALERT\_HANDSHAKE\_FAILURE](https://forum.robotframework.org/t/robotframework-requestslibrary-sslv3-alert-handshake-failure/5812)

<div class="topic-metadata">

**Author:** [@akshayj](https://forum.robotframework.org/u/akshayj)\
**Replies:** 0\
**Last updated:** [12 June 2023 11:13 UTC](https://forum.robotframework.org/t/robotframework-requestslibrary-sslv3-alert-handshake-failure/5812 "2023-06-12T11:13:09Z")

</div>

While executing Post requests using the RequestsLibrary, getting below error SSLError: HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: (Caused by SSLError(SSLError(1, '\[SSL: SSLV3\_ALERT\_HANDSHAKE\_…

---

## [Request-Library Cookie Too Large](https://forum.robotframework.org/t/request-library-cookie-too-large/5571)

<div class="topic-metadata">

**Author:** [@astrowalker2013](https://forum.robotframework.org/u/astrowalker2013)\
**Replies:** 2\
**Last updated:** [18 April 2023 10:39 UTC](https://forum.robotframework.org/t/request-library-cookie-too-large/5571 "2023-04-18T10:39:55Z")

</div>

In my Test, i’m connecte with authentification oauth2.0 with selenium library on my application. my connection is OK and I get the cookie in dictionary after I create a session and add this coookie to used with Get…

---

## [Post Request import a Zip File, but observe an 500 error](https://forum.robotframework.org/t/post-request-import-a-zip-file-but-observe-an-500-error/5539)

<div class="topic-metadata">

**Author:** [@astrowalker2013](https://forum.robotframework.org/u/astrowalker2013)\
**Replies:** 3\
**Last updated:** [13 April 2023 18:38 UTC](https://forum.robotframework.org/t/post-request-import-a-zip-file-but-observe-an-500-error/5539 "2023-04-13T18:38:31Z")

</div>

Hello, I have a question, I migrate my Test Automatique ( in Ready API) to Robotframework For a Test I have an endpoint api Rest who upload a zip file in a process. On Ready API when I used this I have this raw requ…

[Next page](https://forum.robotframework.org/c/libraries/requests/17.md?page=1)
