alexstocker / alexstocker/sensorlogger

405 Method not allowed

Đang mở
#84 2 bình luận 0 reaction 1 người được giao Được @alexstocker nhận Xem trên GitHub
bug nc oc
Ngôn ngữ chính
JavaScript
Star
76
Fork
25
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Describe the bug**
I get error 405 Method not allowed when attempting to register the device.

**To Reproduce**
Steps to reproduce the behavior:
1. Setup device password
2. Run this command: `curl -i --user 'USER:PASSWORD' -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST -d '{"_route":"sensorlogger.apisensorlogger.registerDevice","deviceId":"227a60c3-9b06-4bea-a255-b435642d31fc","deviceName":"Spalna-klima","deviceType":"Indoor","deviceGroup":"Spalna","deviceParentGroup":"Byt BA","deviceDataTypes":[{"type":"temperature","description":"Teplota","unit":"°C"},{"type":"state","description":"Stav","unit":""}]}' https://YOUR_NEXTCLOUD/index.php/apps/sensorlogger/api/v1/registerdevice` with your values for `USER`, `PASSWORD`, `YOUR_NEXTCLOUD`
3. See output - error 405

**Expected behavior**
The device registers

**Additional context**
I managed to sniff the request being sent to the sserver in order to verify it:

```
POST /index.php/apps/sensorlogger/api/v1/registerdevice HTTP/1.1
Connection: close
Host: 192.168..
Content-Length: 336
Authorization: Basic
User-Agent: curl/7.52.1
Content-Type: application/json
Accept: application/json

{"_route":"sensorlogger.apisensorlogger.registerDevice","deviceId":"227a60c3-9b06-4bea-a255-b435642d31fc","deviceName":"Spalna-klima","deviceType":"Indoor","deviceGroup":"Spalna","deviceParentGroup":"Byt BA","deviceDataTypes":[{"type":"temperature","description":"Teplota","unit":"°C"},{"type":"state","description":"Stav","unit":""}]}
```

Other services like CalDAV on Android work.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.