# Array in body part for post request

**URL:** <https://forum.robotframework.org/t/array-in-body-part-for-post-request/2645>\
**Category:** Robot Framework\
**Created:** [27 October 2021 03:48 UTC](https://forum.robotframework.org/t/array-in-body-part-for-post-request/2645 "2021-10-27T03:48:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrm](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@rrm](https://forum.robotframework.org/u/rrm)\
**Post date:** [27 October 2021 03:48 UTC](https://forum.robotframework.org/t/array-in-body-part-for-post-request/2645/1 "2021-10-27T03:48:25Z")

</div>

who to insert array in body part of post request I am getting 500 error. I verified with post man that is due to removing square bracket.

—body part is—  
{

“action”: [  
“sa.pia.is.w”

]  
}

------in my code what I am written is------  
${body} Create Dictionary action=sa.pia.is.w

---

<div class="post-metadata">

**Author:** ![robinmackaij](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/robinmackaij/32/126_2.png) [@robinmackaij](https://forum.robotframework.org/u/robinmackaij)\
**Post date:** [27 October 2021 07:06 UTC](https://forum.robotframework.org/t/array-in-body-part-for-post-request/2645/2 "2021-10-27T07:06:32Z")

</div>

What you’re sending in Postman is different from what you send using RF. What you can try:

```python
${actions_list}= Create List sa.pia.is.w
${body}= Create Dictionary action=${actions_list}

```

Also note that data validation on the endpoint is lacking if you receive a 500 response on invalid data (in your case, a string instead of a list of strings). A typical response would be 422 in such a case.

---

<div class="post-metadata">

**Author:** ![rrm](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@rrm](https://forum.robotframework.org/u/rrm)\
**Post date:** [27 October 2021 10:56 UTC](https://forum.robotframework.org/t/array-in-body-part-for-post-request/2645/3 "2021-10-27T10:56:59Z")

</div>

Thank you, its working.
