# Empty items in response content

**URL:** <https://forum.robotframework.org/t/empty-items-in-response-content/6600>\
**Category:** Robot Framework\
**Created:** [3 January 2024 08:27 UTC](https://forum.robotframework.org/t/empty-items-in-response-content/6600 "2024-01-03T08:27:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhuvik](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@Bhuvik](https://forum.robotframework.org/u/Bhuvik)\
**Post date:** [3 January 2024 08:27 UTC](https://forum.robotframework.org/t/empty-items-in-response-content/6600/1 "2024-01-03T08:27:20Z")

</div>

Hi everyone,

I am Bhuvi, I Started with the robot framework for automation, I found an issue the GET request should have the response of items, but it is giving me the empty item status of 200, but when tired with the Postman items, it has a value response. Kindly help me with this issue.

Thanks.

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [3 January 2024 09:23 UTC](https://forum.robotframework.org/t/empty-items-in-response-content/6600/2 "2024-01-03T09:23:58Z")

</div>

Hi Bhuvi,

I gather you are using RequestsLibrary?

From the [Response Object](https://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html#Response%20Object) are you looking at ${resp.text} or ${resp.json}? As those are the only ones that will show the response body, unless you want raw bytes then use ${resp.content}.

If that doesn’t solve your issue, then you’ll need to look at how your GET request is different from the one Postman is making (headers, cookies, sessions etc)

Hope that helps,

Dave.

---

<div class="post-metadata">

**Author:** ![Bhuvik](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@Bhuvik](https://forum.robotframework.org/u/Bhuvik)\
**Post date:** [3 January 2024 10:17 UTC](https://forum.robotframework.org/t/empty-items-in-response-content/6600/4 "2024-01-03T10:17:50Z")

</div>

Thanks, Dave,

I am using it with the ${Response. content} for the response body , all the headers are expected still it fail, I wonder if Is it because of using the query parameters?

Log Response Content: ${response.content}  
${json\_content}= Evaluate json.loads($response.content)

Regards  
Bhuvi

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [3 January 2024 10:39 UTC](https://forum.robotframework.org/t/empty-items-in-response-content/6600/5 "2024-01-03T10:39:07Z")

</div>

> [@Bhuvik](#):
>
> I wonder if Is it because of using the query parameters?

Quite possibly, how are you passing them?

Showing the lines your robot file that aren’t working and any errors from your log is always a good idea, also screen shots of whats working in Postman is a good idea too particularly the Params and Headers tabs from Postman and the Auth tab if you are using it.

Dave.

---

<div class="post-metadata">

**Author:** ![Bhuvik](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@Bhuvik](https://forum.robotframework.org/u/Bhuvik)\
**Post date:** [4 January 2024 10:48 UTC](https://forum.robotframework.org/t/empty-items-in-response-content/6600/7 "2024-01-04T10:48:44Z")

</div>

Hi ,

I am passingthis way  
${response}= GET On Session my\_session ${endpoint} headers=${headers}

```python
${query_string}= Set Variable fromdate=${from_date}&todate=${to_date}
Log Query String: ${query_string}

```

Thanks.

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [4 January 2024 11:12 UTC](https://forum.robotframework.org/t/empty-items-in-response-content/6600/8 "2024-01-04T11:12:40Z")

</div>

Hi Bhuvi,

A quick tip, use a code block when posting your robot script (``` on the line before and after your script)

```python
${response}= GET On Session my_session ${endpoint} headers=${headers}
${query_string}= Set Variable fromdate=${from_date}&todate=${to_date}
Log Query String: ${query_string}

```

Based on this the first issue is ${query\_string} doesn’t exist when `GET On Session` so it doesn’t have any effect. Also I can’t see ${endpoint} is so I have no idea if it’s constructed correctly

Secondly the 3rd argument of `GET On Session` is `params` as the documentation mentions refer to the documentation for [GET](https://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html#GET) for that, it says

> query string parameters can be passed as string, dictionary (or list of tuples or bytes) through the params.

so maybe your script should be like this:

```python
${query_string}= Set Variable fromdate=${from_date}&todate=${to_date}
Log Query String: ${query_string}
${response}= GET On Session my_session ${endpoint} ${query_string} headers=${headers}

```

But without a clear picture of what your trying to do I can’t give you a better answer than that,

Dave.

---

<div class="post-metadata">

**Author:** ![Bhuvik](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@Bhuvik](https://forum.robotframework.org/u/Bhuvik)\
**Post date:** [5 January 2024 04:57 UTC](https://forum.robotframework.org/t/empty-items-in-response-content/6600/9 "2024-01-05T04:57:38Z")

</div>

> [@damies13](#):
>
> ` headers=${headers}`

Thanks Dave . It worked
