How to make a post request with httparty

162 views Asked by At

I am trying to get the total shares for google plus on a page and having problems passing the below data to httparty.

url is

https://clients6.google.com/rpc?key=YOUR_API_KEY

post body is

[{
    "method":"pos.plusones.get",
    "id":"p",
    "params":{
        "nolog":true,
        "id":"http://stylehatch.co/",
        "source":"widget",
        "userId":"@viewer",
        "groupId":"@self"
        },
    "jsonrpc":"2.0",
    "key":"p",
    "apiVersion":"v1"
}]

How can i submit this data with httparty. Thanks

0

There are 0 answers