question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow Composer to send a HTTP request using non-json body

See original GitHub issue

Background

I’d like to be able to HTTP POST non-json data. Right now I am constrained to json-only.

As an example I’d like to POST application/x-www-form-urlencoded to request an access token from Azure AD.

Currently the validation stops me from saving this:

image

Ideally, this would save without validating the input and make it the responsibility of the person composing the conversation to get it right. Alternatively, if it is necessary to validate, have a dropdown to select the Content-Type similarly to postman/fiddler where you can choose from form-data, x-www-form-urlencoded, json, raw.

Current workaround

I am working around this by proxying the request to Azure AD with a custom API which accepts json input and the Composer/ Adaptive Dialog can connect through to.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
luhan2017commented, Aug 20, 2020

@mg-arrow sorry for the late response, composer already updated the sdk package to 4.10.0, you can try with the latest main branch.

0reactions
fallintoplacecommented, Jan 23, 2021

Does anyone know how to get this body of type “multipart/form-data” to work in Bot Composer? I have tried so many combinations but couldn’t get this to work. And I couldn’t find any suitable answer either. curl_form_data form_data

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make an HTTP request from Bot Framework Composer
Learn how to make an HTTP request to access an external service, on behalf of the user or as part of your business...
Read more >
How to send a url-encoded form data using post request in bot ...
You should send it like this: URL:http://localhost:7071/api/GetStudentGrade Body(string):studentID=${user.
Read more >
How To Work with JSON in MySQL - DigitalOcean
Learn how to use and query JSON data in your MySQL databases. ... This tutorial utilizes Laravel installation via Composer in mind.
Read more >
08 - Send an Http Request in Bot Composer - YouTube
An Bot Composer sends an HTTP request to a HTTP server with request message which includes Request method optionally message body , Header ......
Read more >
Need To Catch Http Request Error In Composer - ADocLib
PHP Fatal error: Allowed memory size of XXXXXX bytes exhausted <.>. ... Try to reference that property from "Send http request" from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found