Skip to content

Commit b922863

Browse files
committed
Adding basic code sample
1 parent e9ce68f commit b922863

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

articles/azure-monitor/app/availability-azure-functions.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ You can use Log Analytics to view your availability results, dependencies, and m
4747

4848
The following example demonstrates a web availability test that requires a simple URL ping using the `getStringAsync()` method.
4949

50-
```csharp
51-
using System.Net.Http;
52-
53-
public async static Task RunAvailabilityTestAsync(ILogger log)
54-
{
55-
using (var httpClient = new HttpClient())
56-
{
57-
// TODO: Replace with your business logic
58-
await httpClient.GetStringAsync("https://www.bing.com/");
59-
}
60-
}
61-
```
50+
```csharp
51+
using System.Net.Http;
52+
53+
public async static Task RunAvailabilityTestAsync(ILogger log)
54+
{
55+
using (var httpClient = new HttpClient())
56+
{
57+
// TODO: Replace with your business logic
58+
await httpClient.GetStringAsync("https://www.bing.com/");
59+
}
60+
}
61+
```
6262

6363
For advanced scenarios where the business logic must be adjusted to access the URL, such as obtaining tokens, setting parameters, and other test cases, custom code is necessary.
6464

0 commit comments

Comments
 (0)