REST Service Calls for .NET - 1.1
Description
This extension provides support for some web services calls from C#.
Supported REST client libraries
| Library | Supported Versions |
|---|---|
| System.Net.Http.HttpClient | .NET Framework 4.5+ → .NET 9 (inbox BCL) |
| System.Net.HttpWebRequest | .NET Framework 1.1+ → .NET 9 (legacy API) |
| Windows.Web.Http.HttpClient | Windows 8.1 → present (legacy Windows-only API) |
| Refit | 1.0.x → 10.0.x |
| RestEase | 0.9.x → 1.6.x |
| RestSharp (RestClient) | 104.0.x → 113.1.x |
| Flurl.Http | 0.1.x → 4.0.x |
Function Point, Quality and Sizing support
- Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported
- Quality and Sizing: a green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist
| Function Points (transactions) | Quality and Sizing |
|---|---|
| ✅ | ❌ |
Dependencies with other extensions
The REST Service Calls for .NET extension requires that ≥ 1.3.4-funcrel or ≥ 1.4.1-funcrel of the .NET Analyzer is also installed and used in order to ensure the most complete set of results. This dependency is not automatically handled when downloading the REST Service Calls for .NET extension, therefore you must ensure that the .NET Analyzer is downloaded and installed before starting an analysis.
What results can you expect?
Features
This extension analyzes web service calls made from C# code through classic fluent APIs. For example with System.Net.Http.HttpClient:
using System;
using System.Net.Http;
class Main
{
void main()
{
var httpClient = new HttpClient();
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get,"hello/world");
httpClient.SendAsync(request);
}
}

Refit
Refit provides the means to call web services through interfaces with attributes. Therefore, analyzing:
using System.Threading.Tasks;
using Refit;
public interface IGitHubApi
{
[Get("/users/{user}")]
Task<string> GetUser(string user);
}
will create:

Objects
| Icon | Object Type | Created when |
|---|---|---|
![]() |
Dotnet Delete Resource Service | HTTP verb is DELETE |
![]() |
Dotnet Get Resource Service | HTTP verb is GET |
![]() |
Dotnet Post Resource Service | HTTP verb is POST |
![]() |
Dotnet Put Resource Service | HTTP verb is PUT |
![]() |
Dotnet Patch Resource Service | HTTP verb is PATCH |
![]() |
Dotnet Unknown Resource Service | HTTP verb is unidentified and no default defined |
Rules
None.
Limitations
- When the code uses a custom URL builder, we cannot evaluate the URL.
- Configuration files are not taken into account




