Welcome Guest, Not a member yet? Register   Sign In
Only GET returns correct response whereas others return 303 redirect to main page

(This post was last modified: 12-25-2022, 10:21 PM by DaveenDomsiline.)

Hello there, I have this peculiar problem - I tinker around making CRUD REST API and I have defined these routes

$routes->group('api/v1', ['namespace' => 'Api\V1', 'filter' => 'ApiGuard'],
static function ($routes) {
$routes->get('companies/(:num).json', '\App\Controllers\Api\V1\Companies::company/$1');
$routes->get('companies.json', '\App\Controllers\Api\V1\Companies::fetchAll');
$routes->post('companies/(:num).json', '\App\Controllers\Api\V1\Companies::post');
$routes->put('companies/(:num).json', '\App\Controllers\Api\V1\Companies::put');
$routes->delete('companies/(:num).json', '\App\Controllers\Api\V1\Companies::delete');

In any case apart from GET method I get 303 redirect omegle.2yu.co to main page, whereas omeglz echat via Guzzle I get 404 Not Found error. What have I done wrong here?

Thank you for your help.

Theme © iAndrew 2016 - Forum software by © MyBB