parroty / exvcr

HTTP request/response recording library for elixir, inspired by VCR.
MIT License
720 stars 131 forks source link

Add mocking for :hackney.body/2 #142

Closed indocomsoft closed 5 years ago

indocomsoft commented 5 years ago

Fixes #141

A recent update to HTTPoison from v1.3.0 to v1.3.1 adds max_body_length option, which is implemented by calling :hackney.body/2 instead of :hackney.body/1.

This PR adds mocking for both the existing :hackney.body/1 and :hackney.body/2 so that exvcr can support HTTPoison v1.3.1 while staying compatible with HTTPoison <=v1.3.0

This is my first PR to a public open-source elixir project, so do let me know if I need to make any changes.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.2%) to 93.582% when pulling f3deff2dea2fbcd4ebfcfa967aaa3b154177e73a on indocomsoft:fix-hackney into 188224357a2106e021e872e20d358f20d38ac9cf on parroty:master.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.2%) to 93.582% when pulling f3deff2dea2fbcd4ebfcfa967aaa3b154177e73a on indocomsoft:fix-hackney into 188224357a2106e021e872e20d358f20d38ac9cf on parroty:master.

Adzz commented 5 years ago

Nice I'm having the same issue

indocomsoft commented 5 years ago

@adzz could you confirm whether my PR fixes the problem?

Adzz commented 5 years ago

I'll give it a go

Adzz commented 5 years ago

@indocomsoft I cant clone your repo so I cant get to the branch

indocomsoft commented 5 years ago

That's weird. Try running git clone https://github.com/indocomsoft/exvcr.git?

Adzz commented 5 years ago

@indocomsoft It worked for me as far as I can tell!

indocomsoft commented 5 years ago

@Adzz cool! Thanks for helping me test it

@parroty perhaps you can take a look so this PR can be merged?

parroty commented 5 years ago

Thanks!