Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7417543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:43:17+00:00 2026-05-29T07:43:17+00:00

I am getting data from a get request. The data (in the body of

  • 0

I am getting data from a get request. The data (in the body of the response) looks something like this:

... ÿÀ���"�ÿÄ��������������ÿÄ�N��!1"AQa2q¡#BR±ð3brS²ÁÂÑá$ñCDTst¢³&45dÃÒÿÄ������������ÿÄ�-������!1A"Qa¡ðq±ÁÑ2áÿÚ���?�û." """ """ """ """ """ """ """ """ """ """ """ """ """ """ """ """ """ """ """ """ """ """ """ """R1º#ª¥7Jíî½M6îNö ]·!]=Fv­ß`7~qÆee²%·JokkZüCbìþ<ù{ã9öùË®´(%A,Ià�2I?t×bn6wÆù¥V 2SÀ><k5ºÙØ92EhÎçü¨/aÝ!ã|ñþ¥ñßT}U«¦ÒÚµ«xuÕfƳ KØ {ù{ð$·DúBMZÆcp}´R|Mä2ó8üg)·ùôfõ$zXiRÞü}óÆ>,êÚûíR5ý:\ .....

the response headers look like this:

HTTP/1.1 200 OK
Content-Length: 26965
Access-Control-Allow-Origin: *
Content-Type: image/jpeg; charset=UTF-8
Date: Mon, 06 Feb 2012 21:14:21 GMT
Expires: Mon, 06 Feb 2012 22:14:21 GMT
Cache-Control: public, max-age=3600
Last-Modified: Fri, 13 Feb 2009 23:31:30 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Server: Dropta Server 1.0
X-Frame-Options: SAMEORIGIN
Connection: close

I want to get the body content which is my image data and save it to a name.jpeg file on the server.

How can I do that? I tried using buffers combined with the fs module, but I am kind of lost.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:43:18+00:00Added an answer on May 29, 2026 at 7:43 am

    Here’s an example, which downloads http://upload.wikimedia.org/wikipedia/commons/1/15/Jagdschloss_Granitz_4.jpg to name.jpeg

    var fs=require('fs');
    var http=require('http');
    
    var f=fs.createWriteStream('name.jpeg');
    
    var options={
        host:'upload.wikimedia.org',
        port:80,
        path:'/wikipedia/commons/1/15/Jagdschloss_Granitz_4.jpg'
    }
    
    http.get(options,function(res){
        res.on('data', function (chunk) {
            f.write(chunk);
        });
        res.on('end',function(){
            f.end();
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I'm getting my data from Mysql like so: $result = $dbConnector->Query(SELECT * FROM
Have problem while getting data from Memcached on .NET MVC solution. I have this
I'm trying to make an ajax-request to vimeo to get data from an vimeo
how can i getting data from listbox in second form named listform while i
What are the differences between using SqlDataAdapter vs SqlDataReader for getting data from a
I have the following situation. Im getting data from an external system in the
I'm getting some data from the web service and saving it in the core
I am getting raw aac data from web stream and try to put it
I am getting some junk data returned from a ToString() call on a DateTime
I'm importing from a CSV and getting data roughly in the format { 'Field1'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.