Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Http\Controllers;
- use Illuminate\Support\Facades\Http;
- use Exception;
- class FingerspotController extends Controller
- {
- public function handle()
- {
- try {
- $req = Http::withHeaders([
- 'Content-Type' => 'application/x-www-form-urlencoded',
- ])->post('http://localhost:8080/scanlog/new', [
- 'sn' => 'FIO66208020150459',
- ]);
- return $req->json();
- } catch(Exception $ex) {
- return $ex->getMessage();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement