forwardemail / forwardemail/superagent

superagent.get can't get response.text

Open
#815 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

The example below, i can't get response.text.

``` js
request
.get('http://192.185.228.226/projects/ma/1-5-2/angular/js/config.js')
.end(function(err, res){
console.log(res.text); // is undefined
});
```

it Response Headers is:

```
HTTP/1.1 200 OK
Server: nginx/1.8.0
Date: Thu, 17 Dec 2015 02:14:29 GMT
Content-Type: application/x-httpd-php
Content-Length: 17528
Connection: keep-alive
Last-Modified: Mon, 30 Nov 2015 14:17:39 GMT
Accept-Ranges: bytes
```

> open the script in browser directly will called to download it, maybe it is a reason that can't get response content. so, replace the url with http://192.185.228.226/projects/ma/1-5-2/angular/css/demo.css is ok.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.