4. El servicio lee los datos
index.html
const respuesta =
await submitForm(
"srv/procesa.php", event)
alert(respuesta.body)
Hace wait esperando response.
srv/procesa.php
$saludo = leeTexto("saludo");
$nombre = leeTexto("nombre");
$resultado =
"{$saludo} {$nombre}.";
devuelveJson($resultado);
Request
POST /srv/procesa.php HTTP/1.1
Accept: application/json, application/problem+json
Accept-Encoding: gzip, deflate
Accept-Language: es-ES,es;q=0.9,en;q=0.8
Connection: keep-alive
Content-Length: 236
Content-Type: multipart/form-data;
boundary=----WebKitFormBoundaryVUFwGKBTJiUGOO3V
Cookie:
__gsas=ID=329641bd2728ff51:T=1743534294:RT=1743534294:S=ALNI_MavjA3FPY-hDE5wNZO5LxFSOVeIIQ;
__test=6409d42a9d124b0fcecbb489e113453c
Host: srvform.rf.gd
Origin: http://srvform.rf.gd
Referer: http://srvform.rf.gd/?i=1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
saludo: hola
nombre: pp
------WebKitFormBoundaryVUFwGKBTJiUGOO3V
Content-Disposition: form-data; name="saludo"
hola
------WebKitFormBoundaryVUFwGKBTJiUGOO3V
Content-Disposition: form-data; name="nombre"
pp
------WebKitFormBoundaryVUFwGKBTJiUGOO3V--
Memoria (Servidor)
- $saludo
- "hola"
- $nombre
- "pp"
skip_previous
skip_next