elsa-workflows / elsa-workflows/elsa-core
FormUrlEncoded strings are not parsed correctly ending up with an error parsing as JSON is expected
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
I ran into an issue with the HTTPRequest activity. I am trying to send a formurlencoded string to an endpoint. The Error I am getting is that the string I passed in, cannot be parsed as JSON.

I then looked into the code and in Elsa.Http/ContentWriters/FormUrlEncodedHttpContentFactory.cs on approx line 23, the issue is originated.
I changed that line so that there is a split between string and object, and when it is string, I created another static function to split on "&" and then on "=" and fed these into the dictionary which works.
I am unfortunately not able to post this change back to the source, so I am reporting it as a bug, hoping it will be fixed in an upcoming release of Elsa, if you consider this a bug too.
Contributor guide
Assessment
This issue has not been assessed yet.