# How to send byte array in body

**URL:** <https://community.postman.com/t/how-to-send-byte-array-in-body/29820>\
**Category:** Help Hub\
**Created:** [November 17, 2021, 11:14am UTC](https://community.postman.com/t/how-to-send-byte-array-in-body/29820 "2021-11-17T11:14:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lavishsahu](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lavishsahu](https://community.postman.com/u/lavishsahu)\
**Post date:** [November 17, 2021, 11:14am UTC](https://community.postman.com/t/how-to-send-byte-array-in-body/29820/1 "2021-11-17T11:14:03Z")

</div>

Dear Team,

We want to transfer byte array from POSTMAN to an API. We are transferring it into body and it is treating like a string.

How we can transfer a byte array from POSTMAN?

Your prompt response will be appreciated.

---

<div class="post-metadata">

**Author:** ![pranavdavar](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pranavdavar/32/9152_2.png) [@pranavdavar](https://community.postman.com/u/pranavdavar)\
**Post date:** [November 17, 2021, 7:27pm UTC](https://community.postman.com/t/how-to-send-byte-array-in-body/29820/2 "2021-11-17T19:27:15Z")

</div>

Hi @lavishsahu,

Can you please try to send base64 encoded string of your byte array in body of postman. And keep the content type as requested by your target application.

Hope this helps 😊

---

<div class="post-metadata">

**Author:** ![lavishsahu](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lavishsahu](https://community.postman.com/u/lavishsahu)\
**Post date:** [November 18, 2021, 8:05am UTC](https://community.postman.com/t/how-to-send-byte-array-in-body/29820/3 "2021-11-18T08:05:54Z")

</div>

@pranavdavar Thanks for update. Could you please let me know, how to define content type in body. My end API is expecting byte array only.

---

<div class="post-metadata">

**Author:** ![pranavdavar](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pranavdavar/32/9152_2.png) [@pranavdavar](https://community.postman.com/u/pranavdavar)\
**Post date:** [November 18, 2021, 8:56am UTC](https://community.postman.com/t/how-to-send-byte-array-in-body/29820/4 "2021-11-18T08:56:52Z")

</div>

If possible can you please share http headers accepted by your api once.

---

<div class="post-metadata">

**Author:** ![lavishsahu](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lavishsahu](https://community.postman.com/u/lavishsahu)\
**Post date:** [November 18, 2021, 9:42am UTC](https://community.postman.com/t/how-to-send-byte-array-in-body/29820/5 "2021-11-18T09:42:26Z")

</div>

> [@pranavdavar](#):
>
> If possible can you please share http headers accepted by your api once

we have given “Content-Type”, “image/png” , still it is treating this input as string.

---

<div class="post-metadata">

**Author:** ![lavishsahu](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lavishsahu](https://community.postman.com/u/lavishsahu)\
**Post date:** [November 18, 2021, 9:53am UTC](https://community.postman.com/t/how-to-send-byte-array-in-body/29820/6 "2021-11-18T09:53:08Z")

</div>

![MicrosoftTeams-image](https://us1.discourse-cdn.com/getpostman/original/3X/0/a/0acb9d8ae874bbe352cb98130fd8047957f497df.png)

---

<div class="post-metadata">

**Author:** ![pranavdavar](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pranavdavar/32/9152_2.png) [@pranavdavar](https://community.postman.com/u/pranavdavar)\
**Post date:** [November 18, 2021, 10:25am UTC](https://community.postman.com/t/how-to-send-byte-array-in-body/29820/7 "2021-11-18T10:25:34Z")

</div>

Hi @lavishsahu ,

There is option to change type in postman body to binary. Can you please try that.

 ![Screenshot_20211118-155425](https://us1.discourse-cdn.com/getpostman/original/3X/5/d/5d8db333bfbe07f55a9dc69620523928125b1511.jpeg)

---

<div class="post-metadata">

**Author:** ![lavishsahu](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lavishsahu](https://community.postman.com/u/lavishsahu)\
**Post date:** [November 18, 2021, 10:52am UTC](https://community.postman.com/t/how-to-send-byte-array-in-body/29820/8 "2021-11-18T10:52:13Z")

</div>

when we are trying to choose binary there is an option of selecting files. In our scenario, we only have option to sent files in some parameter. We don’t have option to select files in our code.
