“I need to get all the tickets from Projeqtor using the ‘../projeqtor/api/ticket/all’ endpoint. However, this endpoint returns a large amount of data, resulting in long response times. Since the Projeqtor API does not support pagination, how can I request the API in a way that avoids excessive data retrieval and reduces response time, similar to how it’s done within Projeqtor itself? The specific line causing the delay is:
HttpResponseMessage response = await _client.GetAsync(apiUrlProjeqtor);
public async Task<string> GetAllTicketsFromProjqtorAsync()
{
string apiUrl = _apiProjqtorUrl + "Ticket/all";
try
{
HttpResponseMessage response = await _client.GetAsync(apiUrl);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
return responseBody;
}
catch (Exception ex)
{
return $"Error: {ex.Message}";
}
}
Alice is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.