Skip to content

Commit

Permalink
Fixed placement
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed May 14, 2023
1 parent 4c8c025 commit b2ea123
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Client.php
Expand Up @@ -437,6 +437,11 @@ private function applyOptions(RequestInterface $request, array &$options): Reque
}
}

if (isset($options['version'])) {
$modify['version'] = $options['version'];
unset($options['version']);
}

$request = Psr7\Utils::modifyRequest($request, $modify);
if ($request->getBody() instanceof Psr7\MultipartStream) {
// Use a multipart/form-data POST if a Content-Type is not set.
Expand All @@ -446,10 +451,6 @@ private function applyOptions(RequestInterface $request, array &$options): Reque
. $request->getBody()->getBoundary();
}

if (isset($options['version'])) {
$modify['version'] = $options['version'];
}

// Merge in conditional headers if they are not present.
if (isset($options['_conditional'])) {
// Build up the changes so it's in a single clone of the message.
Expand Down

0 comments on commit b2ea123

Please sign in to comment.