<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebView/loadSimulatedRequest(_:responseHTML:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebView(im)loadSimulatedRequest:responseHTMLString:"
  },
  "title" : "loadSimulatedRequest(_:responseHTML:)"
}
-->

# loadSimulatedRequest(_:responseHTML:)

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

```
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

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

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)