Browse Source

repl: Set up an http client

master
Elis Hirwing 3 years ago
parent
commit
e439ec2b3d
Signed by: etu GPG Key ID: D57EFA625C9A925F
  1. 6
      repl.php

6
repl.php

@ -1,4 +1,5 @@
<?php
require_once('vendor/autoload.php');
echo 'Welcome to the simple REPL for handling stock of items'.PHP_EOL;
echo PHP_EOL;
@ -13,6 +14,11 @@ echo PHP_EOL;
// Default item name
$defaultItem = 'box';
// Set up http client
$httpClient = new \GuzzleHttp\Client([
'base_uri' => $argv[1],
]);
while (true) {
// Read user input
$line = trim(strtolower(fgets(STDIN)));

Loading…
Cancel
Save