mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
f003359047
Before now, the RestfulService_Response object was never sent the response headers. For APIs that rely on the response headers to send back information (signatures, pagination info, etc). This change makes the curl response have the full HTTP response (including Headers). We then extract the body and the header information and assign them to relevant vars and then construct the response as before (with the addition of the headers array). This change required two new functions: extractResponse: This extracts the HTTP Headers and the payload from the curl response and assigns it to the relevany vars that are passed by reference parseRawHeaders: This was designed to mimic http_parse_headers (a non-standard php class). It converts the headers into an associative array. |
||
---|---|---|
.. | ||
RestfulServiceTest.php | ||
RSSFeedTest.php | ||
XMLDataFormatterTest.php | ||
XMLDataFormatterTest.yml |