Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Many API:s use different data formats for requests and responses. The upcoming patch will allow HttpClient to use different HttpClientFormatters for serialization and parsing.
As the number of configuration options for HttpClient has been growing I'm also introducing the option to pass a single configuration array instead of separate arguments, backwards compatibility is retained with the old-style parameter passing and the previous parameter ordering is also preserved.
Comment | File | Size | Author |
---|---|---|---|
#2 | allowing-separate-formatter-and-parser-1288536-2.patch | 4.05 KB | Hugo Wetterberg |
#1 | allowing-separate-formatter-and-parser-1288536-1.patch | 4.31 KB | Hugo Wetterberg |
Comments
Comment #1
Hugo Wetterberg CreditAttribution: Hugo Wetterberg commentedAnd here's the patch
Comment #2
Hugo Wetterberg CreditAttribution: Hugo Wetterberg commentedUpdated to set the accept-header correctly.
Comment #3
Hugo Wetterberg CreditAttribution: Hugo Wetterberg commentedFixed in 2.3