guessing content-type and decoding properly

There is an issue with get_bulk that breaks when the content_type switches to base64. This detects and decodes bulk gets without errors.