Advertisement
vitareinforce

contoh_gather_fingerspot_php

Mar 1st, 2025
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Http\Controllers;
  4.  
  5. use Illuminate\Support\Facades\Http;
  6. use Exception;
  7.  
  8. class FingerspotController extends Controller
  9. {
  10. public function handle()
  11. {
  12. try {
  13. $req = Http::withHeaders([
  14. 'Content-Type' => 'application/x-www-form-urlencoded',
  15. ])->post('http://localhost:8080/scanlog/new', [
  16. 'sn' => 'FIO66208020150459',
  17. ]);
  18. return $req->json();
  19. } catch(Exception $ex) {
  20. return $ex->getMessage();
  21. }
  22.  
  23. }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement