This is causing the tests to fail since 'headers' is only defined in the above `if` statement - furthermore the test `post_fn` needs to have the headers parameter added to it.

Also the tests should be updated to make sure this works.