Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Norbertho's avatar

How to check the data iI send to the backend API

Hi, I have a form on my website and I would like to send the data coming from the form to an API endpoint, but I dont have the API endpoint yet. I would like to test my post request. Is there any way to check my post request to see what data i send?

public function formSubmit(){
        
        $response = Http::post('TEST_API_ENDPOINT_TO_SEE_WHAT_I_SENT', [
            'name' => $request->name,
			'address' => $request->address,
			
        ]);
        }
    

So is there any way to test what I send? is there any service what would give me an API endpoint wich receive my data and show it to me what i sent?

0 likes
1 reply
trin's avatar

u can use verbose mode

$response = Http::withOptions([
    'debug' => true,
])->post('TEST_API_ENDPOINT_TO_SEE_WHAT_I_SENT', [
	'name' => $request->name,
	'address' => $request->address,
		
]);

and u get raw query from you to end point and back, like CURLOPT_VERBOSE

Please or to participate in this conversation.