[dotnet] Handle the case when http response content type might be null
Content type might be null
@@ -282,7 +282,7 @@ private async Task<HttpResponseInfo> MakeHttpRequest(HttpRequestInfo requestInfo
{
HttpResponseInfo httpResponseInfo = new HttpResponseInfo();
httpResponseInfo.Body = await responseMessage.Content.ReadAsStringAsync();
- httpResponseInfo.ContentType = responseMessage.Content.Headers.ContentType.ToString();
+ httpResponseInfo.ContentType = responseMessage.Content.Headers.ContentType?.ToString();
httpResponseInfo.StatusCode = responseMessage.StatusCode;
return httpResponseInfo;
