Hi all
I have following function definition:
def request(:get, bUri, bUser, bPassword, mHttpHeaders \\ %{}) when is_binary(bUri)
and is_binary(bUser)
and is_binary(bPassword)
do
lAuth = [basic_auth: {bUser, bPassword}]
mHeaders = Map.merge(mHttpHeaders, %{"Accept" => "application/json"})
{:ok, %HTTPoison.Response{status_code: 200, headers: bHeaders, body: bBody}} = HTTPoison.get(bUri, mHeaders, [hackney: lAuth])
[bHeaders: bHeaders, body: bBody]
end
as you can see, I name the parameters as follow:
bUri, bUser, bPassword, mHttpHeaders
b
stays for binary
and m
for map
.
I want to know, how do you find the name convention mentioned above. In my opinion, it is more clear, which datatype I have to pass to the function.
Thanks