PHP Classes

File: TestCases/POST/RegistrationWithAddress.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid (Sharma)   Open Swoole Microservices   TestCases/POST/RegistrationWithAddress.php   Download  
File: TestCases/POST/RegistrationWithAddress.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: Open Swoole Microservices
Implement microservices using Open Swoole
Author: By
Last change: web.php
Date: 4 days ago
Size: 956 bytes
 

Contents

Class file image Download
<?php

/**
 * TestCases
 * php version 8.3
 *
 * @category TestCases
 * @package Openswoole_Microservices
 * @author Ramesh N Jangid <[email protected]>
 * @copyright 2025 Ramesh N Jangid
 * @license MIT https://opensource.org/license/mit
 * @link https://github.com/polygoncoin/Openswoole-Microservices
 * @since Class available since Release 1.0.0
 */

namespace Microservices\TestCases;

use
Microservices\App\Web;

$header = $defaultHeaders;
$header[] = $contentType;
if (isset(
$token)) {
   
$header[] = "Authorization: Bearer {$token}";
}

$params = [
   
'firstname' => 'Ramesh',
   
'lastname' => 'Jangid',
   
'email' => '[email protected]',
   
'username' => 'test',
   
'password' => 'shames11',
   
'address' => [
       
'address' => 'A-203'
   
]
];

return
Web::trigger(
   
homeURL: $homeURL,
   
method: 'POST',
   
route: '/registration-with-address',
   
header: $header,
   
payload: json_encode(value: $params)
);