parnurzeal / gorequest

GoRequest -- Simplified HTTP client ( inspired by nodejs SuperAgent )
http://parnurzeal.github.io/gorequest/
MIT License
3.44k stars 414 forks source link

unexpected end of JSON input in req.EndStruct(body) #261

Open MalarvizhiK opened 3 years ago

MalarvizhiK commented 3 years ago

The below code gives unexpected end of JSON input. The URL will retrieve 2000 documents from Cloudant database.

req := request.New().Get(client.Path + path) req.SetBasicAuth(client.Username, client.Password) req.Header.Add("Accept-Encoding", "application/json") req.Debug = true

body := &cloudantLib.Resp{}
resp, _, errs := req.EndStruct(body)

Is there any limit in the response body ? When we try with small document size like 100, we don't get any error and it works fine.