Last active
November 19, 2024 17:11
-
-
Save johnwesonga/79703e5011e7c7cf300832e9e457ac3b to your computer and use it in GitHub Desktop.
Get specific header for HTTPoison
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{_, server} = "https://github.com" |> HTTPoison.get! |> Map.get(:headers) |> Enum.filter(&match?({"Server", _}, &1)) |> List.first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment