Skip to content

Commit

Permalink
Fix get payload
Browse files Browse the repository at this point in the history
  • Loading branch information
aobukhov committed Jun 4, 2014
1 parent 52be5cd commit 0be4887
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/LinguaLeo/wti/WtiRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ public function build()
$params = $this->jsonEncodeParams ? json_encode($this->params) : $this->params;
curl_setopt($this->resource, CURLOPT_POST, true);
curl_setopt($this->resource, CURLOPT_POSTFIELDS, $params);
} else {
curl_setopt($this->resource, CURLOPT_POST, false);
curl_setopt($this->resource, CURLOPT_POSTFIELDS, []);
}

curl_setopt($this->resource, CURLOPT_URL, $this->buildRequestUrl());
curl_setopt($this->resource, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->resource, CURLOPT_HEADER, 1);
Expand Down Expand Up @@ -95,4 +99,4 @@ private function buildUrlParams()
return $params ? http_build_query($params) : [];
}

}
}

0 comments on commit 0be4887

Please sign in to comment.