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

Enforce match on :hackney.request/1, /2, /3 and /4 #145

Merged
merged 1 commit into from Sep 8, 2019

Conversation

frm
Copy link
Contributor

@frm frm commented Sep 6, 2019

Fixes #144.

When calling either of

:hackney.head(url)
:hackney.request(:head, url)

no request is matched in the target_methods/1 call, due to the fact
that in Hackney head function calls in hackney don't call the body
function.

As a result, when making :hackney.head/1 calls, the request hits
the destination instead of being captured.

I'm not sure if this is the best option to do so, but adding defaults seemed a sensible option.

Fixes parroty#144.

When calling either of

```elixir
:hackney.head(url)
:hackney.request(:head, url)
```

no request is matched in the `target_methods/1` call, due to the fact
that in Hackney `head` function calls in hackney don't call the `body`
function.

As a result, when making `:hackney.head/1` calls, the request hits
the destination instead of being captured.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 92.929% when pulling 67480d0 on frm:master into 7bd7aa2 on parroty:master.

@parroty parroty merged commit 4bf4652 into parroty:master Sep 8, 2019
@parroty
Copy link
Owner

parroty commented Sep 8, 2019

Thanks!

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

Successfully merging this pull request may close these issues.

Only matches Hackney calls to request/5
3 participants