I'm getting some unexpected results when firing HTTPoison request()'s within 1 second of each other. Every second request I am consistently seeing some sort of cached response, where it falls and hits one of my cases, but it doesn't ping the URL at all.
case HTTPoison.request(:post, url, file) do
{:ok, %HTTPoison.Response{status_code: 200, body: []}} ->
# Work
{:ok, %HTTPoison.Response{status_code: 400, body: body}} ->
# This clause gets hit the first time correctly based on the response from the endpoint, and it also hits it the second time, but without firing a request at the endpoint at all...
_ ->
# More work
end
Regards,
Dakota
P.S. I wait until the request is fully complete on both sides before hitting it again.
I'm getting some unexpected results when firing HTTPoison request()'s within 1 second of each other. Every second request I am consistently seeing some sort of cached response, where it falls and hits one of my cases, but it doesn't ping the URL at all.
Regards,
Dakota
P.S. I wait until the request is fully complete on both sides before hitting it again.