0

I am struggeling with Flurl.Http to verify the response text of a GetAsync() request. My code:

var resp = await "https://.../version"
                .GetAsync();

Assert.Equal(200, resp.StatusCode);
Assert.Equal("1.0.0.0", resp.WhatDoIHaveToDoHere?);

Someone here who knows how to do that?

1 Answer 1

0

I assume you're expecting 1.0.0.0 to be in the body of the response? If so, this should do it:

Assert.Equal("1.0.0.0", await resp.GetStringAsync());
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.