Hello I am a beginner in Elixir and I’m currently running into the following issue.
When trying to make a post request to a server using httpoison.
def send(xml_message) do
url = "https://******/LIMessageProcessing/http/UICCCMessageProcessing/UICCCMessageProcessingInboundWS"
response = HTTPoison.post(url ,[], hackney: [:insecure])
req = Poison.decode!(response.body)
end
I recieve the following error:
[info] ['TLS', 32, 'client', 58, 32, 73, 110, 32, 115, 116, 97, 116, 101, 32, 'certify', 32, 'at ssl_handshake.erl:364 generated CLIENT ALERT: Fatal - Internal Error - {unexpected_error,{case_clause,{error,{asn1,{...}}}}}', 10]
[info] Sent 500 in 126ms
[error] #PID<0.924.0> running TaftapServiceWeb.Endpoint (connection #PID<0.923.0>, stream id 1) terminated
Server: localhost:4000 (http)
Request: POST /
** (exit) an exception was raised:
** (ArgumentError) argument error
:erlang.apply({:error, %HTTPoison.Error{id: nil, reason: {:tls_alert, 'internal error'}}}, :body, [])
No matter what options I pass to the post method it will always return this error.
If posting to another url (e.g https://google.com/)
I get the following error:
(exit) an exception was raised:
** (ArgumentError) argument error
:erlang.apply({:error, %HTTPoison.Error{id: nil, reason: :nxdomain}}, :body, [])
Using HTTPoison.get on https://google.com/ works but using get on the domain I want to post to yields the same {:tls_alert, ‘internal error’}}}.
I am sure that the server I am trying to post to functions as it should be as I have been able to make succesful requests from SAOP UI and Ruby.
Elixir version: 1.8.1
Erlang version: 21.2.6