I liked the approach of @kostikovmu as it looks simpler than other long codes. though this is not exactly what we are after..We look for this header format : "...key: value\r\n...".
So i used extended the fomula to get that
urldecode(str_replace("=", ": ", http_build_query($headers,"", "\r\n")))