{"action":"closed","issue":{"url":"https://api.github.com/repos/jkakar/aws-elixir/issues/33","repository_url":"https://api.github.com/repos/jkakar/aws-elixir","labels_url":"https://api.github.com/repos/jkakar/aws-elixir/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/jkakar/aws-elixir/issues/33/comments","events_url":"https://api.github.com/repos/jkakar/aws-elixir/issues/33/events","html_url":"https://github.com/jkakar/aws-elixir/issues/33","id":142542745,"number":33,"title":"problems with AWS.CloudSearch.Domain.upload_documents","user":{"login":"wyattisimo","id":625546,"avatar_url":"https://avatars.githubusercontent.com/u/625546?v=3","gravatar_id":"","url":"https://api.github.com/users/wyattisimo","html_url":"https://github.com/wyattisimo","followers_url":"https://api.github.com/users/wyattisimo/followers","following_url":"https://api.github.com/users/wyattisimo/following{/other_user}","gists_url":"https://api.github.com/users/wyattisimo/gists{/gist_id}","starred_url":"https://api.github.com/users/wyattisimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyattisimo/subscriptions","organizations_url":"https://api.github.com/users/wyattisimo/orgs","repos_url":"https://api.github.com/users/wyattisimo/repos","events_url":"https://api.github.com/users/wyattisimo/events{/privacy}","received_events_url":"https://api.github.com/users/wyattisimo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-22T04:06:57Z","updated_at":"2016-03-23T02:56:36Z","closed_at":"2016-03-23T02:56:36Z","body":"I'm new to Elixir and attempting to upload document to AWS CloudSearch.\r\n\r\nThe `upload_documents` function is defined as follows:\r\n```elixir\r\ndef upload_documents(client, input, options \\\\ []) do\r\n  ...\r\nend\r\n```\r\nIf I do this:\r\n```elixir\r\nclient = %AWS.Client{\r\n  access_key_id: access_key_id,\r\n  secret_access_key: secret_access_key,\r\n  region: \"us-east-1\",\r\n  endpoint: doc_endpoint\r\n}\r\n\r\ninput = %{\r\n  \"documents\" => [\r\n    %{\r\n      \"type\"   => \"add\",\r\n      \"id\"     => \"1\",\r\n      \"fields\" => %{\r\n        \"first_name\"   => \"Your\",\r\n        \"last_name\"    => \"Mom\",\r\n        \"phone_number\" => \"5551212\"\r\n      }\r\n    }\r\n  ]\r\n}\r\n\r\nAWS.CloudSearch.Domain.upload_documents(client, input)\r\n```\r\nThen I get this:\r\n```\r\n** (ArgumentError) argument error\r\n    :erlang.list_to_integer([])\r\n    src/hackney_url.erl:184: :hackney_url.parse_netloc/2\r\n    src/hackney.erl:334: :hackney.request/5\r\n    lib/httpoison/base.ex:396: HTTPoison.Base.request/9\r\n    lib/aws/cloud_search_domain.ex:124: AWS.CloudSearch.Domain.perform_request/6\r\n```\r\n\r\n`options` defaults to `[]`, which seems to be the cause of the problem here. Is this a bug, or am I missing something?\r\n\r\nAlso, I'm not entirely certain what data should be sent for `options` anyway."}}