Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make HttpCompletionOption configurable #126

Closed
basdijkstra opened this issue Aug 6, 2024 · 9 comments
Closed

Make HttpCompletionOption configurable #126

basdijkstra opened this issue Aug 6, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request waiting for feedback Waiting for feedback from issue submitter

Comments

@basdijkstra
Copy link
Owner

See this discussion for more details: #125

@basdijkstra basdijkstra added the enhancement New feature or request label Aug 6, 2024
@basdijkstra basdijkstra self-assigned this Aug 6, 2024
@basdijkstra
Copy link
Owner Author

@RothAndrew tagging you so you can follow the progress in here.

@basdijkstra
Copy link
Owner Author

basdijkstra commented Aug 13, 2024

@RothAndrew could you upgrade to https://www.nuget.org/packages/RestAssured.Net/4.3.0-beta.1 and test whether setting the HttpCompletionOption works as intended for you? Example:

Given()
    .UseHttpCompletionOption(HttpCompletionOption.ResponseHeadersRead)

The value defaults to HttpCompletionOption.ResponseContentRead, so if that's the value you need, you don't have to specify anything.

In this release, you can only set the HttpCompletionOption value for individual requests, not yet in the RequestSpecification or global config. I'll add that as soon as I know this is what you were looking for.

If you can think of a better name for the UseHttpCompletionOption method I'm open to suggestions ;)

@basdijkstra basdijkstra added the waiting for feedback Waiting for feedback from issue submitter label Aug 13, 2024
@RothAndrew
Copy link

RothAndrew commented Aug 14, 2024

Yep! Will give it a shot now.

@RothAndrew
Copy link

It's working great! Thanks! 😁

@RothAndrew
Copy link

If you can think of a better name for the UseHttpCompletionOption method I'm open to suggestions ;)

I've always been a fan of using descriptive names over short and cryptic so I love it.

I suppose if you really wanted something different I could potentially see the argument being

// Wait for all the content. Equivalent to using HttpCompletionOption.ResponseContentRead
Given()
  .WaitForContent(true)
  
// Don't wait for content. Equivalent to using HttpCompletionOption.ResponseHeadersRead
Given()
  .WaitForContent(false)

with the default being true to preserve backward compatibility

@basdijkstra
Copy link
Owner Author

Thanks so much for the feedback! Happy to hear it works. I’ll add the options to the RequestSpecification and the config options and will release a proper 4.3.0 soon.

@basdijkstra basdijkstra removed the waiting for feedback Waiting for feedback from issue submitter label Aug 15, 2024
@basdijkstra
Copy link
Owner Author

@RothAndrew RestAssured.Net 4.3.0 is live: https://www.nuget.org/packages/RestAssured.Net/4.3.0

You can now also specify the HttpCompletionOption in a RequestSpecification and in the global config. Feel free to install and test it.

Please let me know if all still works OK, so I can close the issue. Cheers!

@basdijkstra basdijkstra added the waiting for feedback Waiting for feedback from issue submitter label Aug 16, 2024
@basdijkstra
Copy link
Owner Author

Any more feedback, @RothAndrew? If not I’ll close this issue.

@RothAndrew
Copy link

Nope, everything's great. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting for feedback Waiting for feedback from issue submitter
Projects
None yet
Development

No branches or pull requests

2 participants