PHP Classes

File: TestCases/POST/Category.php

Recommend this page to a friend!
  Packages of Ramesh Narayan Jangid (Sharma)   PHP Microservices Framework   TestCases/POST/Category.php   Download  
File: TestCases/POST/Category.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: PHP Microservices Framework
Setup microservices apps with configuration arrays
Author: By
Last change: DocBlcck
Copyright
Date: 6 days ago
Size: 1,442 bytes
 

Contents

Class file image Download
<?php

/**
 * TestCases
 * php version 8.3
 *
 * @category TestCases
 * @package Microservices
 * @author Ramesh N. Jangid (Sharma) <polygon.co.in@gmail.com>
 * @copyright © 2026 Ramesh N. Jangid (Sharma)
 * @license MIT https://opensource.org/license/mit
 * @link https://github.com/polygoncoin/Microservices
 * @since Class available since Release 1.0.0
 */

namespace Microservices\TestCases;

use
Microservices\App\Web;

$header = $defaultHeaders;
// $header[] = 'Content-Type: multipart/form-data; charset=utf-8';
if (isset($token)) {
   
$header[] = "Authorization: Bearer {$token}";

   
$params = [
        [
           
'name' => 'ramesh0',
           
'sub' => [
               
'subname' => 'ramesh1',
               
'subsub' => [
                    [
                       
'subsubname' => 'ramesh'
                   
],
                    [
                       
'subsubname' => 'ramesh'
                   
]
                ]
            ]
        ],
        [
           
'name' => 'ramesh1',
           
'sub' => [
               
'subname' => 'ramesh1',
               
'subsub' => [
                   
'subsubname' => 'ramesh'
               
]
            ]
        ]
    ];

    return
Web::trigger(
       
homeURL: $homeURL,
       
method: 'POST',
       
route: '/category/import',
       
header: $header,
       
payload: '',//json_encode(value: $params),
       
file: $curlFile
   
);
}