Created
September 10, 2018 14:24
-
-
Save tmenier/3417dcdf6ef0dfc6d0480ae778065b72 to your computer and use it in GitHub Desktop.
Repro attempt https://stackoverflow.com/questions/52259616/flurl-posturlencoded-does-get-instead-of-post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public async Task StackOverflowQuestion() { | |
var message = ""; | |
try { | |
var cli = new FlurlClient("https://www.google.com").EnableCookies(); | |
var s = await cli.Request().GetStringAsync(); | |
var result = await cli.Request("foo").PostUrlEncodedAsync(new { x = "x" }); | |
} | |
catch (FlurlHttpException ex) { | |
message = ex.Message; | |
} | |
Assert.AreEqual("Call failed with status code 404 (Not Found): POST https://www.google.com/foo", message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment