\n\nI have a weird scenario playing out where in I have a python based function, where I dumped just before the endpoint returns and the output is showing \n\n{'body': '{\"error\": \"Method Not Allowed - POST\", \"Scenario\": \"42d0d764-a729-41e5-a8f4-1c1b7ec0b5ec\"}', \n 'status': 405, \n 'headers': {\n 'Content-Type': 'application/json', \n 'Access-Control-Allow-Origin': 'https://mysubdomain.mydomaincom/', \n 'Access-Control-Allow-Methods': 'POST, OPTIONS', \n 'Access-Control-Allow-Headers': 'Content-Type, Authorization'\n }\n}\n\nwhich is exactly what it needs to be.\n\nBut on web client (plan JS) side I have the attached JS code and I am seeing the following output \n\nPOST REST API responded with status: 200\nPOST REST API responded with status text: \nPOST REST API headers:: [Array(2)]\nPOST REST API response data:: {error: 'Method Not Allowed - POST', Scenario: '42d0d764-a729-41e5-a8f4-1c1b7ec0b5ec'}\n\nHow is it that the body data is intact, but the status got switched from 405 to 200?","author":{"@type":"Person","name":"CodePanda"},"datePublished":"2024-06-10T01:24:39.656Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/LikeAction","userInteractionCount":1}}}
Skip to content
Back
WebCloud

Appwrite Python function returning status 405 but client receiving 200

Votes

1

Replies

0

Participants

Unknown

Messages

1

CodePandaOriginal post

Rank 1: Thread

Join the discussion

Reply to this thread by joining our Discord.

Reply on Discord