---
id: "P:cAlgo.API.WebViewNavigationCompletedEventArgs.HttpStatusCode"
kind: "property"
type: "T:cAlgo.API.WebViewNavigationCompletedEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/HttpStatusCode/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# WebViewNavigationCompletedEventArgs.HttpStatusCode

Member of [WebViewNavigationCompletedEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/index.md).

## HttpStatusCode

Response HTTP status code.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Never raised in the CLI: the events that pass it never fire there (WebView.NavigationCompleted).
- Cloud: Never raised in the cloud: the events that pass it never fire there (WebView.NavigationCompleted).

C#:

```csharp
public int HttpStatusCode {get;}
```

Python:

```python
webViewNavigationCompletedEventArgs.HttpStatusCode: int
```

### Returns

`int` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    var webView = new WebView();
    webView.NavigationCompleted += OnNavigationCompleted;
    Chart.AddControl(webView);
    webView.NavigateAsync("https://ctrader.com/");
}

private void OnNavigationCompleted(WebViewNavigationCompletedEventArgs args)
{
    if (args.HttpStatusCode == 404)
        Print("Page not found: {0}", args.Url);
}
```

Python:

```python
def on_start(self):
    webView = WebView()
    webView.NavigationCompleted += self.on_navigation_completed
    api.Chart.AddControl(webView)
    webView.NavigateAsync("https://ctrader.com/")

def on_navigation_completed(self, args):
    if args.HttpStatusCode == 404:
        api.Print(f"Page not found: {args.Url}")
```

