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

  • SEARCH
  • Home
  • 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 6574051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:12:41+00:00 2026-05-25T15:12:41+00:00

req = http.request options, (res) -> res.on ‘data’, (chunk) -> data += chunk return

  • 0
  req = http.request options, (res) ->
    res.on 'data', (chunk) ->
      data += chunk
      return
    res.on 'end', ->
      if res.statusCode is 200
        console.log res
        console.log data
        callback null, data
      else
        callback(new Error("Response status code: " + res.statusCode), data)
      return
    return

When I output data, I get:
[object Object][["INZ", 41.878113599999999, -87.629798199999996]] which is odd because the part after [object Object] is all good. Any ideas?

  • 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-25T15:12:42+00:00Added an answer on May 25, 2026 at 3:12 pm

    You’re not defining data, so you’re getting undefined += chunk, as I said in my comment. You can solve it like @Trevor Burnham said:

    req = http.request options, (res) ->
      data = ''
      res.on 'data', (chunk) ->
        data += chunk
        return
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With this code, urllib2 make a GET request: #!/usr/bin/python import urllib2 req = urllib2.Request('http://www.google.fr')
Suppose I am retrieving a url as follows: string url = http://www.somesite.com/somepage.html HttpWebRequest req
Quite simple really: var req:URLRequest=new URLRequest(); req.url=http://somesite.com; var header:URLRequestHeader=new URLRequestHeader(my-bespoke-header,1); req.requestHeaders.push(header); req.method=URLRequestMethod.GET; stream.load(req); Yet,
I am using this code: def req(url, postfields): proxy_support = urllib2.ProxyHandler({http : 127.0.0.1:8118}) opener
I have an app that makes a HTTP GET request to a particular URL
I need to send a HTTP request (and get XML response) from Flash that
def post_to_twitter message = from some where url = URI.parse('http://twitter.com/statuses/update.xml') req = Net::HTTP::Post.new(url.path) req.basic_auth
I want to make an Http request and store the result in a JSONObject.
I'm reading a HTTP POST and the body of the HTTP request can be
I have this code which successfully makes an HTTP request: //Successful request var requestInBytes

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.