vendredi 9 août 2019

Testing a function that performs an HTTP call in Go [on hold]

I have a function that after processing some arguments generates a rather complex HTTP call.

I'm looking at both httptest and httpmock but I can't figure out if instead of only mocking a server (in a way or another, it really doesn' matter) they also let me check on the body the mocked endpoint receives. What I'm thinking about is something ala webmock with the with(body:) option.

Can anybody point at an example? I feel like I'm missing something right under my nose.

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire