Skip to content

Commit 87fd1df

Browse files
authored
Sync Request.Continue tests (#1058)
1 parent 867677c commit 87fd1df

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/PuppeteerSharp.Tests/NetworkTests/RequestContinueTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public async Task ShouldAmendPostData()
9696
await e.Request.ContinueAsync(new Payload
9797
{
9898
Method = HttpMethod.Post,
99-
PostData = "FooBar"
99+
PostData = "doggo"
100100
});
101101
};
102102
var requestTask = Server.WaitForRequest("/sleep.zzz", async request =>
@@ -112,7 +112,7 @@ await Task.WhenAll(
112112
Page.GoToAsync(TestConstants.ServerUrl + "/sleep.zzz")
113113
);
114114

115-
Assert.Equal("FooBar", await requestTask.Result);
115+
Assert.Equal("doggo", await requestTask.Result);
116116
}
117117
}
118118
}

lib/PuppeteerSharp/Request.cs

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ internal Request(
148148

149149
/// <summary>
150150
/// Continues request with optional request overrides. To use this, request interception should be enabled with <see cref="Page.SetRequestInterceptionAsync(bool)"/>. Exception is immediately thrown if the request interception is not enabled.
151+
/// If the URL is set it won't perform a redirect. The request will be silently forwarded to the new url. For example, the address bar will show the original url.
151152
/// </summary>
152153
/// <param name="overrides">Optional request overwrites.</param>
153154
/// <returns>Task</returns>

0 commit comments

Comments
 (0)