Closed 1player closed 4 years ago
It's just user agent detection.
7> gun:get(C, "/en/sport/364/meetings", #{<<"user-agent">> => <<"curl/7.68.0">>}).
#Ref<0.2748838253.3639607299.118217>
8> flush().
Shell got {gun_response,<0.110.0>,#Ref<0.2748838253.3639607299.118217>,nofin,
200,
Note that if you provide a user-agent like <<"Gun">>
or <<"Gun/1.0">>
you get a 502
instead.
Note: this request has not been working with any Erlang/Elixir HTTP client, OK with curl and browsers.
The URL in question is
https://partners.betvictor.mobi/en/sport/364/meetings
and other paths under that hostname.curl has no issues loading that URL, with either HTTP/1 or HTTP/2:
Gun 1.3.2 unexpectedly returns a 400 error, both in http2 and http mode
As I said, I could not make this request work on Hackney either, due to possibly SNI issues - https://github.com/benoitc/hackney/issues/612
Any help in making this work, like curl does?