AL icon indicating copy to clipboard operation
AL copied to clipboard

Using HttpClient.UseServerCertificateValidation requires to use return value, but only in method usage.

Open dannoe opened this issue 9 months ago • 0 comments

1. Describe the bug Using the new function UseServerCertificateValidation on the HttpClient requires the developer to use its return value. This isn't the case for e.g. HttpRequestMessage.Method('GET'). Unless there's a good reason, it shouldn't be necessary to use the return value;

2. To Reproduce

local procedure Test()
var
     Client: HttpClient;
begin
     Client.UseServerCertifiateValidation(false); // **wrong** error AL0192: The return value must be used for the method 'UseServerCertificateValidation' 
     Client.UseServerCertificateValidation := false; // no error
end;

3. Expected behavior Allow using the property syntax without using the return value. (like e.g. HttpRequestMessage.Method('GET');)

Client.UseServerCertifiateValidation(false);

4. Actual behavior You can not use the property syntax without using the return value.

5. Versions:

  • AL Language: Version: 15.0.1338262

Internal work item: AB#572193

dannoe avatar Mar 07 '25 19:03 dannoe