# Http task utf8 not decoding correctly

**URL:** https://forum.flowable.org/t/http-task-utf8-not-decoding-correctly/7927
**Category:** Flowable Engine
**Created:** [June 4, 2021, 9:36am UTC](https://forum.flowable.org/t/http-task-utf8-not-decoding-correctly/7927 "2021-06-04T09:36:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Aicha](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aicha](https://forum.flowable.org/u/Aicha)
#### Post date: [June 4, 2021, 9:36am UTC](https://forum.flowable.org/t/http-task-utf8-not-decoding-correctly/7927/1 "2021-06-04T09:36:54Z")

</div>

Hello Flowable developers,

I have sent an http request to create new variable ( **using http task** ) with this parameters :  
**Request headers:**  
Accept: application/json;charset=UTF-8  
Cache-Control: no-cache  
Accept-Encoding: gzip,deflate  
Content-Type: application/json;charset=UTF-8

/\*\*_ **in my json value i send a special characters** _/  
**Request body**  
[  
{  
“name”:“dossier”,  
“type”:“json”,  
“value”:{  
“nom\_Client”:“test فلان”},  
“scope”:“local”  
}  
]  
But, using swagger to get this variable, I am getting the following :  
{  
“name”: “dossier”,  
“type”: “json”,  
“value”: {  
“nom\_Client”: “test ???”,  
“montantCredit”: “1.2E8”,  
“typeCredit”: “”  
},  
“scope”: “local”  
},  
==\> Probably it is encoding the body with a wrong format at the level of HTTP  
Task

NB : when I try the same request from Postman it work perfectly

 ![capture](https://canada1.discourse-cdn.com/flex035/uploads/flowable/original/2X/9/922352eedb144efa0545ddb1ab29dd858b7a0e3a.png)  
similarly swagger return data correctly  
 ![swagger](https://canada1.discourse-cdn.com/flex035/uploads/flowable/original/2X/6/6a99324e1564cb9d5bf359c75938cc9fc9807145.png)

## Is there a way to handle this ?

Best regards

---

<div class="post-metadata">

### Author: ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)
#### Post date: [June 14, 2021, 3:17pm UTC](https://forum.flowable.org/t/http-task-utf8-not-decoding-correctly/7927/2 "2021-06-14T15:17:55Z")

</div>

It looks like that’s a limitation of Swagger. But why is this a problem? Are you exposing Swagger as an end-user API?

---

<div class="post-metadata">

### Author: ![sarath-soman](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/sarath-soman/32/3195_2.png) [@sarath-soman](https://forum.flowable.org/u/sarath-soman)
#### Post date: [May 31, 2023, 9:03am UTC](https://forum.flowable.org/t/http-task-utf8-not-decoding-correctly/7927/3 "2023-05-31T09:03:50Z")

</div>

In the HttpTask adding requestBodyEncoding to utf-8 solves the issue.

```auto
<serviceTask id="httpTask1" name="HTTP task" flowable:parallelInSameTransaction="true" flowable:type="http">
      <extensionElements>
        .......
        <flowable:field name="requestBodyEncoding">
          <flowable:string><![CDATA[utf-8]]></flowable:string>
        </flowable:field>
       .....
      </extensionElements>
    </serviceTask>

```

**Note:** The BPMN XML spec is generated using the modeller in flowable enterprise edition (Flowable Design)
