-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I'm working with the 1.0.0. branch!
The module attribute @http_adapter in the Intercom.API.Request module doesn't work reliably for me. Using iex -S mix to get into the elixir repl, @http_adapter is nil even though Application.get_env(:intercom, :http_adapter) does return the correct value. I'm getting the following error:
** (UndefinedFunctionError) function nil.post/4 is undefined
nil.post("https://api.intercom.io/users", "{\"custom_attributes\":{\"is_hcp\":true,\"occupation\":\"other\",\"real_country\":\"at\",\"real_first_name\":\"test\",\"real_gender\":\"male\",\"real_last_name\":\"test\",\"real_title\":\"test\",\"real_zip\":\"1060\",\"speciality\":\"\"},\"email\":\"seed@dgns.local\",\"id\":1,\"name\":\"\",\"signed_up_at\":1579171202}", [Authorization: "Bearer dG9rOmMxODQ5MGRlXzQ1NmFfNGE3Ml9hYjJiXzE3Nzc3MDFlNzRiYjoxOjA=", Accept: "application/json", "Content-Type": "application/json"], [])
(intercom) lib/intercom/api/request.ex:11: Intercom.API.Request.make_request/4
(intercom) lib/intercom/api.ex:28: Intercom.API.call_endpoint/3
Changing the module to either use HTTPPoison directly or instead of using @http_adaptercalling the following function works:
defp http_adapter() do
Application.get_env(:intercom, :http_adapter)
end
I'm not sure what's the best approach to reading modules from the config is.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.