Skip to content

Commit fb1524b

Browse files
committed
refractor: add default value
1 parent f219090 commit fb1524b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/OpenLRW.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ public static function serverStatus()
8383

8484

8585

86-
/**
87-
* Creates a JSON Web Token
88-
*
89-
* @return mixed|\Psr\Http\Message\ResponseInterface
90-
* @throws GenericException
91-
* @throws \Exception
92-
*/
86+
/**
87+
* Creates a JSON Web Token
88+
*
89+
* @return mixed|\Psr\Http\Message\ResponseInterface
90+
* @throws GenericException
91+
* @throws \Exception
92+
*/
9393
public static function generateJwt()
9494
{
9595
$route = 'api/auth/login';
@@ -142,9 +142,9 @@ public static function httpDelete($route, $header)
142142
return self::$http->delete($route, $header);
143143
}
144144

145-
public static function httpPost($route, $data, $header)
145+
public static function httpPost(string $route, array $json, array $header = ['X-Requested-With' => 'XMLHttpRequest', 'Content-Type' => 'application/json'])
146146
{
147-
return self::$http->post($route, $data, $header);
147+
return self::$http->post($route, $json, $header);
148148
}
149149

150150
public static function httpPatch($route, $data, $header)

0 commit comments

Comments
 (0)