I am using FreshBooks API and trying to get all clients list, but getting only few records in response even though there are several records.
Please help why it is not returning all.
String data = "<request method=\"client.list\"></request>";
WebRequest myReq = WebRequest.Create(url);
myReq.Method = "POST";
myReq.ContentLength = data.Length;
myReq.ContentType = "application/xml; charset=UTF-8";
string usernamePassword = "ec220f3d3599d3f4e79ea8ef545faa31" + ":" + "x";
UTF8Encoding enc = new UTF8Encoding();
myReq.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(enc.GetBytes(usernamePassword)));
using (Stream ds = myReq.GetRequestStream())
{
ds.Write(enc.GetBytes(data), 0, data.Length);
}
var wr = (HttpWebResponse)myReq.GetResponse();
var receiveStream = wr.GetResponseStream();
StreamReader reader = new StreamReader(receiveStream, Encoding.Default);
string content = reader.ReadToEnd();
reader.Close();