ruby on rails - How to get the responses of an API call (shopify)? -
i've been using rails week , have found numerous tutorials haven't found info current problem. have webshop running , can access via shopify console:
shopifyapi::customer.find(674469828) -> return customer id 674469828
if use same code in rails app nothing happens. error message of api call , have no idea how this. mean i'm sending post request service , getting response (http/1.1 200 ok example).
how can "catch" http response in code? how can display response header? use simple http requests , responses if there's api, why not use it.
i'd thankful help.
assuming have set app api credentials etc, can "catch" response assigning variable, so:
customer = shopifyapi::customer.find(674469828) # can play around customer object customer.name # => "jimmy"
if doesn't / missing point, please post specific error message or server output getting along specific request made.
Comments
Post a Comment