---
title: Sending Request with the FormData RequestType
description: Some services and devices require that sent queries include the content-type parameter set as application/x-www-form-urlencoded in the header. Such situation occurs, for example, in the case with the
---

[Skip to content](https://knowledgebase.grenton.com/en/gate-http-sending-request-with-the-formdata-requesttype#main-content)

English

Show submenu for translations

[New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new?hsLang=en) [Customer portal](https://knowledgebase.grenton.com/wsparcie?hsLang=en)

![Logo\_Grenton\_Main\_2020\_RGB\_v1.0-1.png\]](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_Main_2020_RGB_v1.0-1.png?width=200&height=94&name=Logo_Grenton_Main_2020_RGB_v1.0-1.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new)
- [Customer portal](https://knowledgebase.grenton.com/wsparcie)
- [Trainings](https://www.grenton.com/cooperation/trainings.html)

[Trainings](https://www.grenton.com/cooperation/trainings.html)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://knowledgebase.grenton.com/en?hsLang=en)
2. [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en)
3. [Gate HTTP](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-http)

# Sending Request with the FormData RequestType

Some services and devices require that sent queries include the content-type parameter set as *application/x-www-form-urlencoded *in the header.

Such situation occurs, for example, in the case with the [Tedee lock integration](https://bazawiedzy.grenton.pl/gate-http-integration-with-tedee-lock?hsLang=en) where the following request must be sent to obtain a token:

```
POST https://tedee.b2clogin.com/tedee.onmicrosoft.com/B2C_1_SignIn_Ropc/oauth2/v2.0/token Content-Type: application/x-www-form-urlencodedgrant_type=password &client_id=02106b82-0524-4fd3-ac57-af774f340979 &scope=openid 02106b82-0524-4fd3-ac57-af774f340979 &response_type=token &username={username} &password={password}POST https://tedee.b2clogin.com/tedee.onmicrosoft.com/B2C_1_SignIn_Ropc/oauth2/v2.0/token Content-Type: application/x-www-form-urlencoded grant_type=password &client_id=02106b82-0524-4fd3-ac57-af774f340979 &scope=openid 02106b82-0524-4fd3-ac57-af774f340979 &response_type=token &username={username} &password={password}POSThttps://tedee.b2clogin.com/tedee.onmicrosoft.com/B2C_1_SignIn_Ropc/oauth2/v2.0/token Content-Type: application/x-www-form-urlencoded grant_type=password &client_id=02106b82-0524-4fd3-ac57-af774f340979 &scope=openid 02106b82-0524-4fd3-ac57-af774f340979 &response_type=token &username={username} &password={password}POST https://tedee.b2clogin.com/tedee.onmicrosoft.com/B2C_1_SignIn_Ropc/oauth2/v2.0/token Content-Type: application/x-www-form-urlencoded grant_type=password &client_id=02106b82-0524-4fd3-ac57-af774f340979 &scope=openid 02106b82-0524-4fd3-ac57-af774f340979 &response_type=token &username={username} &password={password}
```

**Note!** In place of {username} and {password} enter the appropriate data.

In this situation the settings of the* HttpRequest* virtual object should look as follows:![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35119815993original44vahIlYeqmZSf_2WfnyNqAMZU1oP3W8BQ-2.png)

The script that sets the contents of the* RequestBody* property looks as follows:

```
local get_key = {"&grant_type=password&client_id=02106b82-0524-4fd3-ac57-af774f340979&scope=openid+02106b82-0524-4fd3-ac57-af774f340979&response_type=token&username=support%40grenton.com&password=support"} Gate_HTTP->TedeeLock_AuthorizationKey->SetRequestBody(get_key)
```

**Note!** The*** &*** character has appeared before the *grant\_type* parameter.

During setting the value of the *RequestBody* feature, keep in mind the special characters that need to be encoded:

| : | / | ? | # | \[ | \] | @ | ! | $ | & | ' |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| %3A | %2F | %3F | %23 | %5B | %5D | %40 | %21 | %24 | %26 | %27 |

| ( | ) | \* | + | , | ; | = | % |  spacja |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| %28 | %29 | %2A | %2B | %2C | %3B | %3D | %25 | + |

**Note! **The unencoded characters* &* and *= *separate the parameters and their values.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/support.grenton.plensupportsolutionsarticles35000170829-gate-http-sending-request-with-the-formdata-requesttypehit-2.gif)

- [Installation guidelines](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#main-content)

    - [How to Prepare Electrical Installation](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#how-to-prepare-electrical-installation)
- [Reference devices](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#main-content)

    - [Integrated Device](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#integrated-device)
- [Most Common Mistakes](https://knowledgebase.grenton.com/en/most-common-mistakes?hsLang=en)
- [Electrical Installation](https://knowledgebase.grenton.com/en/electrical-installation?hsLang=en)
- [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en#main-content)

    - [Gate Modbus](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-modbus)
    - [Training](https://knowledgebase.grenton.com/en/manuals?hsLang=en#training)
    - [SW Applications](https://knowledgebase.grenton.com/en/manuals?hsLang=en#sw-applications)
    - [Gate HTTP](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-http)
    - [Smart Panel](https://knowledgebase.grenton.com/en/manuals?hsLang=en#smart-panel)
    - [Configuration](https://knowledgebase.grenton.com/en/manuals?hsLang=en#configuration)
    - [myGrenton interfaces](https://knowledgebase.grenton.com/en/manuals?hsLang=en#mygrenton-interfaces)
    - [Virtual Objects](https://knowledgebase.grenton.com/en/manuals?hsLang=en#virtual-objects)
    - [Gate Alarm](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-alarm)
- [Intercom](https://knowledgebase.grenton.com/en/intercom?hsLang=en)
- [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#main-content)

    - [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#faq)
    - [About Grenton](https://knowledgebase.grenton.com/en/faq?hsLang=en#about-grenton)
- [Price list and documents](https://knowledgebase.grenton.com/en/price-list-and-documents?hsLang=en)

[![Grenton logo](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png?width=400&height=100&name=Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png "Grenton logo")](http://grenton.com)

<https://www.facebook.com/grenton.smart.home> <https://www.instagram.com/grenton_smart_home/> <https://www.youtube.com/channel/UCFNNI-dgO1cm81kCrSr1bzg> <https://www.linkedin.com/company/grenton>

Copyright © 2026, Grenton Sp.z o.o.