Hi,
I'm trying to figure out why two GET requests using Requests.jl and
HTTPClient.jl produce different results. The one of the main differences
appears to be the inclusion of a couple CR+LFs ("\r\n") when using
Requests.jl.
The result using HTTPClient is the desired result, I'm just trying to
understand what's going on when I use Requests.jl.
Thank you,
- Drew
----
julia> using HTTPClient
julia> b =
get("https://data.cms.gov/api/views/2d4k-5n3h/rows.csv?accessType=DOWNLOAD")
HTTP Code :200
RequestTime :0.968298
Headers :
X-Socrata-Region : production
Content-disposition : attachment; filename=CMS_Innovation_Advisors.csv
Access-Control-Allow-Origin : *
Connection : keep-alive
Content-Type : text/csv; charset=utf-8
Transfer-Encoding : chunked
Date : Fri, 30 May 2014 03:04:30 GMT
Age : 0
Last-Modified : Wed, 17 Oct 2012 18:56:27 PDT
Server : nginx
ETag : "f3915436f7b0cd3410c80c13451ec4e"
Length of body : 12031
julia> contains(bytestring(b.body), "\r\n")
false
----
julia> using Requests
julia> a =
get("https://data.cms.gov/api/views/2d4k-5n3h/rows.csv?accessType=DOWNLOAD")
Response(200 OK, 16 Headers, 16234 Bytes in Body)
julia> contains(a.data, "\r\n")
true
julia> length(a.data)
12036