I am trying to test the following line of code:
httpReq.Header.Set("Content-Type", "application/json")
I am mocking the request to an external api in this way:
httpmock.RegisterResponder(http.MethodPost, "do-not-exist.com",
httpmock.NewStringResponder(http.StatusOK, `{
"data":{"Random": "Stuff"}}`),
)
And want to test if the request to the api has the header that I assigned. Is there a way I could achieve this?