Web Developer
Im just trying to print query Parameters or Json data parameters as output, but body and query are always empty when called using API POST Endpoint.
Executing Manually works:
req:[object Object]
payloadundefined
bodyRaw:{
"data": "{\"name\":\"testName\",\"email\":\"test@email.com\",\"content\":\"testContent\"}"
}
body:"{\n \"data\": \"{\\\"name\\\":\\\"testName\\\",\\\"email\\\":\\\"jtest@email.com\\\",\\\"content\\\":\\\"testContent\\\"}\"\n}"
headers:{"host":"66087cd8e79f8:3000","x-appwrite-trigger":"http","x-appwrite-user-id":"66081b69033c6a######","x-appwrite-user-jwt":"##########JKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiI2NjA4MWI2OTAzM2M2YTM2YWFhYSIsInNlc3Npb25JZCI6IjY2MDgxYjg5Mjg4NGRlODkxYzQxIiwiZXhwIjoxNzEx##########.40qodo##########-NCeOGOA2YwvSoLhouBmQC#####","x-appwrite-continent-eu":"false","content-type":"application/x-www-form-urlencoded","connection":"keep-alive","content-length":"88"}
scheme:http
method:POST
url:http://66087cd8e79f8:3000/
host:66087cd8e79f8
port:3000
path:/
queryString:
query:{}
Content-Type: application/x-www-form-urlencoded
Parsed form data: {"{\n \"data\": \"{\\\"name\\\":\\\"testName\\\",\\\"email\\\":\\\"test@email.com\\\",\\\"content\\\":\\\"testContent\\\"}\"\n}":""}
response: {"{\n \"data\": \"{\\\"name\\\":\\\"testName\\\",\\\"email\\\":\\\"test@email.com\\\",\\\"content\\\":\\\"testContent\\\"}\"\n}":""}
Same called by API (sending X-Appwrite-Project=MYPROJECT, X-Appwrite-Key=MYKEY, Content-Type=application/json, and raw data as:
{
"data": "{\"name\":\"JP\",\"email\":\"jtraverso@gmail.com\",\"content\":\"hola\"}"
}
Response:
req:[object Object]
payloadundefined
bodyRaw:
body:""
headers:{"host":"cloud.appwrite.io","x-appwrite-trigger":"http","x-appwrite-continent-eu":"false","connection":"keep-alive","content-length":"0"}
scheme:http
method:POST
url:http://cloud.appwrite.io/
host:cloud.appwrite.io
port:80
path:/
queryString:
query:{}
Content-Type: undefined