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

Question: Chaos testing with Polly (different HttpClient) #197

Open
64J0 opened this issue Jul 17, 2024 · 0 comments
Open

Question: Chaos testing with Polly (different HttpClient) #197

64J0 opened this issue Jul 17, 2024 · 0 comments

Comments

@64J0
Copy link

64J0 commented Jul 17, 2024

Description:

Hello, hope you're good. I'm currently reading this article from Microsoft and trying to replicate it with F#. I'm able to extract the HttpClient from the HttpContext, but I'm not sure how to pass it to the FsHttp to use.

For example, I have a function that receives the HttpContext's (httpClient: HttpClient) as parameter, with the chaos engineering configuration:

http {
    config_setHttpClientFactory (fun _config -> httpClient)

    GET serviceURL

    AuthorizationUserPw user passw
}

Is this the right way to use it? I was +/- inspired by this test scenario: https://github.com/fsprojects/FsHttp/blob/master/src/Tests/DotNetHttp.fs.

Edit:

It's missing something, because when I try to run this request using the different httpClient it does not work properly.

image

@SchlenkR SchlenkR closed this as completed Oct 3, 2024
@SchlenkR SchlenkR reopened this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants