According to the documentation:
conn = Faraday.new(:url=>'http://url')
conn.post '/logon', mystring
There are two errors in your code. The first one is that you are missing a comma between the URL and the variable causing { mystring }
to be interpreted as a block.
The second error is that mystring
already holds a string and the following code does not make sense in Ruby:
{ "string" }
Thus conn.post '/logon', mystring
is wrong. So the final result is:
conn = Faraday.new(:url=>'http://url')
conn.post '/logon', mystring
or:
conn = Faraday.new(:url=>'http://url')
conn.post '/logon', { :key => mystring }
if you want to submit a key/value POST body. But this is not your case, because you are already posting an XML body.