PHPExpertsInc / RESTSpeaker

A quick and easy GuzzleHTTP extension for effortlessly handling RESTful APIs.
MIT License
7 stars 3 forks source link

HTTP Headers are doubled. #10

Closed hopeseekr closed 5 years ago

hopeseekr commented 5 years ago

Due to how the HTTPSpeaker merges options, you end up with this

array:3 [
  "json" => array:1 [
    "autoPay" => false
  ]
  "debug" => true
  "headers" => array:4 [
    "User-Agent" => "PHPExperts/RESTSpeaker-1.0 (PHP 7.3.4)"
    "Content-Type" => "text/html"
    "apiAccessKeyId" => "ntallaferro@texaslawshield.com"
    "apiSecretAccessKey" => "Isr@elYBetel7"
  ]
]
array:2 [
  0 => "v1/accounts/2c92a0fd528ddeff0152afdc9bb95a9c"
  1 => array:3 [
    "json" => array:1 [
      "autoPay" => false
    ]
    "debug" => true
    "headers" => array:4 [
      "User-Agent" => "PHPExperts/RESTSpeaker-1.0 (PHP 7.3.4)"
      "Content-Type" => "application/json"
      "apiAccessKeyId" => "ntallaferro@texaslawshield.com"
      "apiSecretAccessKey" => "Isr@elYBetel7"
    ]
  ]
]

This causes various requests to third party APIs to fail.

hopeseekr commented 5 years ago

Verified fixed and released.