Getting the x-request-id using the Ruby API gem

Solved

Getting the x-request-id using the Ruby API gem

sengming
Shopify Partner
52 1 9

Hi there, what is the best way to use the official Shopify Ruby API to get the x-request-id from the request headers?

 

Currently using https://github.com/Shopify/shopify-api-ruby/tree/v9.5.1

 

Thanks!

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1453 238 508

This is an accepted solution.

Hey @sengming - there is some good documentation on how you can implement headers within API response when using our Ruby API gem here at this link to the GitHub repo for the gem. 

 

I do know that the HTTP REST client that's built into the gem does offer functionality to allow you to retrieve headers associated with a response, but for any further troubleshooting I'd recommend opening an issue in the repo itself, even if it is just to ask a question like this as it is the best place for the most current information on the gem itself. Hope this helps! 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 508

This is an accepted solution.

Hey @sengming - there is some good documentation on how you can implement headers within API response when using our Ruby API gem here at this link to the GitHub repo for the gem. 

 

I do know that the HTTP REST client that's built into the gem does offer functionality to allow you to retrieve headers associated with a response, but for any further troubleshooting I'd recommend opening an issue in the repo itself, even if it is just to ask a question like this as it is the best place for the most current information on the gem itself. Hope this helps! 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog