Importing media from url

Continuing the discussion from Import media from url:

Hi, The httpClientLib doesn’t return body or bodyStream if the contentType is not text. So how do I get stream for image, is there something that I need to send as part of the request?

(Documentation from httpClientLib)

Hi, I just tested the code from the link above to fetch the image and save it as content. Everything worked perfectly fine without any extra parameters. See the code below. Can you post yours?

var httpClientLib = require('/lib/http-client');
var response = httpClientLib.request({
    url: '',
    method: 'GET'

var responseStream = response.bodyStream;

var mediaResult = contentLib.createMedia({
    name: 'myImage',
    parentPath: '/',
    mimeType: 'image/png',
    data: responseStream

It is working. I had referred the wrong http-Client. Thank you