Hello,

On 27 ŽÁŽ┼Ž┬ 2014, at 06:59 , Raja Tirupati <lists / ruby-forum.com> wrote:

> Hi All,
> I'm using rest-client gem to send POST request but getting error that
> "connect attempt failed".

Can you connect to that server using curl? For example:

curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"one":"value_here", "two":"value_here"}' http://URL/accounts

Please post full curl reply.

> 
> Below are few details on this.
> 
> require 'rest-client'
> url="http://<link>/accounts"
> 
> post=RestClient.post(url,{"email" =>
> "ra / se.com","password"=>'hello'},{"appkey" =>
> "WsQILsaaKGkzrrzJ36","Content-type"=>"application/json"})
> 
> => above post request helps to create user account with email and
> password. I'm getting error that "connection attempt failed". But it was
> succeeded with Chrome Plug-in(DHP - Dev HTTP Client).
> 
> -- 
> Posted via http://www.ruby-forum.com/.


Panagiotis (atmosx) Atmatzidis

email:	atma / convalesco.org
URL:	http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5
--
"The fool doth think he is wise, but the wise man knows himself to be a fool." - William Shakespeare