Skip to main content



No record found.

Business Central forum
Suggested answer

Send API get request with x-www-form-urlencoded in AL

Posted on by 75

In postman I can send get request by putting content in body and by selecting text/plain as content type as shown below:
basically i'm trying to send  x-www-form-urlencoded data through raw body because i don't to know how to send  x-www-form-urlencoded request using AL if you know this then please help.
By the way this is working fine on postman but when I try to do this in AL (Code is below), this error occurstokn.png


so its shows error at response.content.readas right after client.send and this is the errorScreenshot-2020_2D00_09_2D00_19-004717.png

is there any problem in my code, or is there any other method to send request of x-www-form-urlencoded ?

  • Umar Khokhar Profile Picture
    Umar Khokhar 75 on at
    RE: Send API get request with x-www-form-urlencoded in AL


    In Postman its also text/Plain :/ and its working fine in postman

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,137 on at
    RE: Send API get request with x-www-form-urlencoded in AL

    Does the current content type produce what is needed? In postman for instance you can set it to be x-www-form-urlencoded. Your AL code uses plain/text.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,420 Super User

Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans