> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor/ks.reactor.ksiwebrequestfactory.md).

# Delegate ksIWebRequestFactory

Namespace: [KS.Reactor](/reactor/api-reference/ks.reactor.md)\
Assembly: KSCommon.dll

Factory for creating a ksIWebRequest.

```csharp
public delegate ksIWebRequest ksIWebRequestFactory(string url, WebHeaderCollection headers = null, string method = null, ksJSON request = null, object stateObject = null)
```

#### Parameters

`url` [string](https://learn.microsoft.com/dotnet/api/system.string)

URL.

`headers` [WebHeaderCollection](https://learn.microsoft.com/dotnet/api/system.net.webheadercollection)

Header collection.

`method` [string](https://learn.microsoft.com/dotnet/api/system.string)

Request method (default GET).

`request` [ksJSON](/reactor/api-reference/ks.reactor/ks.reactor.ksjson.md)

JSON request data.

`stateObject` [object](https://learn.microsoft.com/dotnet/api/system.object)

User defined state tracking object.

#### Returns

[ksIWebRequest](/reactor/api-reference/ks.reactor/ks.reactor.ksiwebrequest.md)
