Serializing Objects to URL Encoded Form Data
See the original posting on DZone Python
While messing with dictionaries to create form data for FormUrlEncodedContent to see I could send data to a server using an HTTP client, I started thinking about easier and cleaner ways to do it. I was writing integration tests and I wanted to re-use some model classes instead of dictionaries. Here’s how to do it. Sample integration test is incluced.
Those who are currently writing integration tests for some ASP.NET Core web applications may also find the following writings interesting: