Tracing HTTPS Rest API Request with shopify_api gem

Solved
Highlighted
Tourist
3 0 2

Hi all!

I've been having good luck getting started with talking to Shopify's REST API using the ruby gem. However, I'd like to know more about what's going on "under the hood". Is there a way I can snoop on the HTTPs traffic generated by the gem? I'm familiar with wireshark and other things like that.

I want to see things like:

  • The request/response headers
  • Request body
  • How the gem decides whether to POST or PUT when dealing with objects.
  • etc.

Apologies if this has a really simple answer that I'm just missing, I'm new to the Ruby ecosystem.

Any help would be appreciated!

0 Likes
Highlighted
Shopify Partner
1227 5 80

This is an accepted solution.

Hi Nepthar,

Enter the following in a console session:

Net::HTTP.enable_debug!

HTH, Gavin.

www.bookthatapp.com
0 Likes