---
title: "loadSimulatedRequest(_:responseHTML:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebview/loadsimulatedrequest(_:responsehtml:)"
---

# loadSimulatedRequest(_:responseHTML:)

Loads the web content from the HTML you provide as if the HTML were the response to the request.

## Declaration

```swift
func loadSimulatedRequest(_ request: URLRequest, responseHTML string: String) -> WKNavigation
```

## Parameters

- `request`: A URL request that specifies the base URL and other loading details the system uses to interpret the HTML you provide.
- `string`: The HTML code you provide in a string to use as the contents of the webpage.

## Return Value

Return Value A new navigation object you use to track the loading progress of the request.

## See Also

### Loading web content

- [load(_:mimeType:characterEncodingName:baseURL:)](webkit/wkwebview/load(_:mimetype:characterencodingname:baseurl:).md)
- [loadHTMLString(_:baseURL:)](webkit/wkwebview/loadhtmlstring(_:baseurl:).md)
- [loadFileRequest(_:allowingReadAccessTo:)](webkit/wkwebview/loadfilerequest(_:allowingreadaccessto:).md)
- [loadFileURL(_:allowingReadAccessTo:)](webkit/wkwebview/loadfileurl(_:allowingreadaccessto:).md)
- [loadSimulatedRequest(_:response:responseData:)](webkit/wkwebview/loadsimulatedrequest(_:response:responsedata:).md)
- [isLoading](webkit/wkwebview/isloading.md)
- [estimatedProgress](webkit/wkwebview/estimatedprogress.md)
