Bug introduced in V11.0 and persisting through 11.3
[CASE:3981157] confirmed
asso = <|
"Scheme" -> "http"
, "Domain" -> "www.wolframalpha.com/"
, "ContentType" -> "application/json"
|>;
This is a valid and documented syntax:
HTTPRequest @ asso //InputForm
HTTPRequest[ <|"Scheme" -> "http", "Domain" -> "www.wolframalpha.com/"|> , <|"ContentType" -> "application/json"|> ]
but it breaks when one provides options:
HTTPRequest[asso, CharacterEncoding -> Automatic] // InputForm
HTTPRequest[ <|"Scheme" -> "http", "Domain" -> "www.wolframalpha.com/", "ContentType" -> "application/json"|> , <||> , CharacterEncoding -> Automatic ]
So it was not split correctly on url and metadata part. Which will result in malformed request.
Have I missed something?