I’d like to get the list of dates which include images of a particular extent, so I send an http-request to
the following url: “https://services.sentinel-hub.com/ogc/wfs/myID?REQUEST=GetFeature&TYPENAMES=S2.TILE&OUTPUTFORMAT=application/json&BBOX=600965,5819367,1610917,5826373&TIME=2019-01-01/2019-09-01”
When I use Google Chrome for it, I usually get an immediate result.
However this doesn’t suit our system requirements and I have to perform such requests from an application, which is written in C# and works under IIS control.
So when I perform a request using the code below, I don’t get any response within any acceptable period of time. Finally the request crashes into a timeout exception.
public static async Task<IEnumerable> GetAvailableSentinelImagesDates(string startDate, string finalDate, string bbox)
{
var getAvailableSentinelImagesDatesUrl = “https://services.sentinel-hub.com/ogc/wfs/?REQUEST=GetFeature&TYPENAMES=S2.TILE&OUTPUTFORMAT=application/json&BBOX=&TIME=/”;
var serviceUrl = getAvailableSentinelImagesDatesUrl.Replace("", sentinelHubId).Replace("", bbox).Replace("", startDate).Replace("", finalDate);
using (var httpClient = new HttpClient())
{
var serviceResponse = await httpClient.GetAsync(new Uri(serviceUrl));
serviceResponse.EnsureSuccessStatusCode();
string responseBody = await serviceResponse.Content.ReadAsStringAsync();
}
}
Could anyone please shed a light on this situation?