Conversation
| # A string is valid JSON, make the difference between text | ||
| # and a plain JSON string. | ||
| # Content-Type is a good indicator of intent from user | ||
| elif content_type and content_type.startswith("text/"): |
There was a problem hiding this comment.
I'm wondering if we've created a bit of a mishmash in how we decide how to serialize/pass request bodies. We are using the Content-Type header, which parameters we pass in (form_data or content/stream_content) as well as looking at the content mixed together. For example, we will try to serialize the data as json even if I specify a completely different header (assuming I didn't pass in an Element instance that is :)). This is a reasonable first step given where we are.
There was a problem hiding this comment.
Yes, I'm not really happy by the black magic, it's why I took the simplest approach to avoid two much black magic: when you cannot guess at all if this is a string test, or a string token of JSON.
…into regenerate_keys * 'master' of https://github.com/Azure/azure-sdk-for-python: don't use mgmt track2 (Azure#12183) Fix pip version requirement in build-test.yml (Azure#12148) Revert "Resolve Pip Related Errors (Azure#12157)", Pin VirtualEnv (Azure#12169) Smart text serialization (Azure#12149) Remove OSName Variable (Azure#12147) [formrecognizer] add strongly-typed receipt wrapper sample (Azure#12128) Add missing __init__ type annotations (Azure#12146) fix sample in readme (Azure#12144)
Fix #12137