The official client libraries for accessing SmartyStreets APIs from the PHP Hypertext Processor.
28
stars
15
forks
source link
[5.0.1] New `withXForwardedFor` autocomplete builder method results in incorrect HTTP header #56
Closed
shengslogar closed 4 months ago
https://github.com/smartystreets/smartystreets-php-sdk/commit/0dc5c313641a42998103afb74d3b190d82773267#diff-2258d1b1c88120c093643b76c98deca30e816a85c7e3f9788be6b8013a6c85edR85-R88 introduced the
withXForwardedFor
method to allow passing an IP address to Smarty's autocomplete API for geographically-adjacent suggestions (related comment/issue).In testing, this has no effect on API results.
https://github.com/smartystreets/smartystreets-php-sdk/blob/41f35cbb91d3a4a9d780cd76315aaeaba165c901/src/NativeSender.php#L85-L88
Changing the HTTP header results in an API response as expected. (Although the docs specify
X-Forwarded-At
, casing does not appear to be important.)