Skip to content

Commit

Permalink
Merge pull request #34 from fuzhufang/master
Browse files Browse the repository at this point in the history
Fix postJson parameter type error and increase the appropriate parameter type
  • Loading branch information
kiss291323003 authored Oct 21, 2020
2 parents 502d5b6 + 9f1988e commit 2d12206
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utility/NewWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function post($endpoint, $data, $options = [])
return $client->setTimeout(self::$TIMEOUT)->post($data);
}

public static function postJson(string $endpoint, array $data, $options = [])
public static function postJson(string $endpoint, string $data, $options = [])
{
$client = new HttpClient($endpoint);
$client->setTimeout(self::$TIMEOUT);
Expand All @@ -50,7 +50,7 @@ public static function postJson(string $endpoint, array $data, $options = [])
return $client->postJson($data);
}

public static function postXML($endpoint, $data, $options = [])
public static function postXML(string $endpoint, string $data, $options = [])
{
$client = new HttpClient($endpoint);
$client->setTimeout(self::$TIMEOUT);
Expand Down

0 comments on commit 2d12206

Please sign in to comment.