Skip to content

add optional ShopifyAPI::Context::httparty_params #1376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

senid231
Copy link

@senid231 senid231 commented Apr 23, 2025

Description

Fixes #1375

Adds the ability to configure a proxy server for all ShopifyAPI HTTP requests

ShopifyAPI::Context.setup(
  # other params...
  httparty_params: {
    timeout: 60, # Set the open/read/write timeout for HTTP requests
    open_timeout: 60, # Set the open timeout for HTTP requests
    read_timeout: 60, # Set the read timeout for HTTP requests
    write_timeout: 60, # Set the write timeout for HTTP requests
    debug_output: false, # Set to true to enable debug output for HTTP requests
    http_proxyaddr: "http://proxy.example.com:8080", # Set the HTTP proxy address
    http_proxyport: 8080, # Set the HTTP proxy port
    http_proxyuser: "username", # Set the HTTP proxy username
    http_proxypass: "password", # Set the HTTP proxy password
  }
)

How has this been tested?

proxy server configuration can't be tested via WebMock because it ignores proxy settings

Checklist:

  • My commit message follows the pattern described in here
  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the project documentation.
  • I have added a changelog line.

@senid231 senid231 requested a review from a team as a code owner April 23, 2025 09:05
Allows to override HTTP request params such as timeout, debug_output, or proxy settings.
@senid231 senid231 force-pushed the context-add-httparty-params branch from 978c053 to 8ed225d Compare April 23, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add proxy support for HTTP requests
1 participant