小编V. *_*TIN的帖子

使用Node JS在Node JS上进行HTTP请求回调

嗨,我正在尝试使用回调方法通过http获得响应。但是我得到了很多信息,但没有得到我的数据:

    Request {
  domain: null,
  _events: 
   { error: [Function: bound ],
     complete: [Function: bound ],
     pipe: [Function] },
  _eventsCount: 3,
  _maxListeners: undefined,
  uri: 
   Url {
     protocol: 'http:',
     slashes: true,
     auth: null,
     host: 'localhost',
     port: 80,
     hostname: 'localhost',
     hash: null,
     search: '?filter=route_short_name',
     query: 'filter=route_short_name',
     pathname: '/php-rest/api.php/routes',
     path: '/php-rest/api.php/routes?filter=route_short_name',
     href: 'http://localhost/php-rest/api.php/routes?filter=route_short_name' },
  callback: [Function],
  readable: true,
  writable: true,
  _qs: 
   Querystring {
     request: [Circular],
     lib: { formats: [Object], parse: [Function], stringify: [Function] },
     useQuerystring: undefined,
     parseOptions: {},
     stringifyOptions: {} },
  _auth: 
   Auth { …
Run Code Online (Sandbox Code Playgroud)

javascript json http node.js

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

http ×1

javascript ×1

json ×1

node.js ×1