praekelt/vumi — pull request #455 by justinvdm (2013-01-29 15:23:47+00:00)
Title: Allow optional headers in HttpRpcTransport's responses

`HttpRpcTransport`'s `finish_request()` handles responses to http requests. `finish_request()` accepts the response body's data and the response code as arguments. However, it does not allow headers to be added to the response. This could be changed, such that `finish_request()` allows headers to be passed in as an optional param.

This change is needed for integration with IMImobile's HTTP API for USSD. While a workaround is possible (overriding `finish_request()` and copying most of its code, or working with `_requests` directly, allowing an optional header arg in `HttpRpcTransport`'s `finish_request()` seems cleaner and less repetitive, and may be needed in future for other transports subclassing `HttpRpcTransport`.