Add support for multipart responses. Work in progress.

`$entity_id_info` seems to be an undefined variable?