slaxor505/OpenPlantbook-client

"Connection refused" response when creating new entry

Closed this issue · 2 comments

Steps to reproduce

  • authenticate and get Bearer token
  • POST to create a new entry

Post:

curl -v --request POST 'http://open.plantbook.io/api/v1/plant/create' --header 'Authorization: Bearer <MY_TOKEN>' --header 'Content-Type: application/json' --data-raw '{
    "display_pid": "Calathea rufibarba",
    "alias": "Goeppertia rufibarba",
    "max_light_mmol": 4600,
    "min_light_mmol": 1700,
    "max_light_lux": 35000,
    "min_light_lux": 800,
    "max_temp": 23,
    "min_temp": 15,
    "max_env_humid": 85,
    "min_env_humid": 30,
    "max_soil_moist": 65,
    "min_soil_moist": 20,
    "max_soil_ec": 1000,
    "min_soil_ec": 100
}'

Response:

Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 168.138.110.105...
* TCP_NODELAY set
* connect to 168.138.110.105 port 80 failed: Connection refused
* Failed to connect to open.plantbook.io port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to open.plantbook.io port 80: Connection refused

🤦 PEBKAC
That's the problem with copy-paste not reading what you're pasting.

Thanks.