# 405 NOT\_ALLOWED - windows 11, xampp 8.2, slim 4 and insomnia

**URL:** <https://discourse.slimframework.com/t/405-not-allowed-windows-11-xampp-8-2-slim-4-and-insomnia/5872>\
**Category:** Questions\
**Created:** [April 3, 2024, 8:19pm UTC](https://discourse.slimframework.com/t/405-not-allowed-windows-11-xampp-8-2-slim-4-and-insomnia/5872 "2024-04-03T20:19:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinibarr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/vinibarr/32/1559_2.png) [@vinibarr](https://discourse.slimframework.com/u/vinibarr)\
**Post date:** [April 3, 2024, 8:19pm UTC](https://discourse.slimframework.com/t/405-not-allowed-windows-11-xampp-8-2-slim-4-and-insomnia/5872/1 "2024-04-03T20:19:37Z")

</div>

Hi guys;

I have windows 11, xampp 8.2 (php 8.2), slim 4 and insomnia.

When a tried any tests from slim website, i receive this:

{  
“statusCode”: 405,  
“error”: {  
“type”: “NOT\_ALLOWED”,  
“description”: “Method not allowed. Must be one of: OPTIONS”  
}  
}

How a solve this ? I have any experience with slim 3 with windows 10 and php 7.4 and i never received this.

I can´t run a simple “hellow world”…

Tanks;

---

<div class="post-metadata">

**Author:** ![akrabat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/akrabat/32/9_2.png) [@akrabat](https://discourse.slimframework.com/u/akrabat)\
**Post date:** [April 4, 2024, 7:10am UTC](https://discourse.slimframework.com/t/405-not-allowed-windows-11-xampp-8-2-slim-4-and-insomnia/5872/2 "2024-04-04T07:10:43Z")

</div>

Need more information, but your client is sending OPTIONS to a URL that isn’t expecting that. At a guess it’s a CORS thing.

---

<div class="post-metadata">

**Author:** ![vinibarr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/vinibarr/32/1559_2.png) [@vinibarr](https://discourse.slimframework.com/u/vinibarr)\
**Post date:** [April 4, 2024, 1:01pm UTC](https://discourse.slimframework.com/t/405-not-allowed-windows-11-xampp-8-2-slim-4-and-insomnia/5872/3 "2024-04-04T13:01:40Z")

</div>

I´m trying to use the small samples from de slim website…

```php
<?php

declare(strict_types=1);

use App\Application\Actions\User\ListUsersAction;
use App\Application\Actions\User\ViewUserAction;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\App;
use Slim\Interfaces\RouteCollectorProxyInterface as Group;

return function (App $app) {
    $app->options('/{routes:.*}', function (Request $request, Response $response) {
        // CORS Pre-Flight OPTIONS Request Handler
        return $response;
    });

    $app->get('/', function (Request $request, Response $response) {
        $response->getBody()->write('Hello world!');
        return $response;
    });

    $app->group('/users', function (Group $group) {
        $group->get('', ListUsersAction::class);
        $group->get('/{id}', ViewUserAction::class);
    });
   
};

```
