Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ContentHandler and PostData
#1
Hi, I am struggling to get raw json data via a post to my contenthandler.

Code:
$.ajax({type: "POST",
   url: "/url-to-my-content-handler",
    data: {"field1": "fieldvalue", "field2", "field2value"},
    contentType: "application/json; charset=utf-8",
    datatype: "json"
   })


So how can I fetch the post data in the contenthandler? ContentFields will separate all fields into something like this (mostly)
field1=fieldvalue
field2=field2value

because my json structure is a little bit complexer (contains further objects and arrays) than in the demo this is not the way I can go.

I am missing somethling like aRequest.PostData as String or TStream. Is it there but I can not find it?

The XML-Example is using uploading a file but that's not the way I go here.

Best regards
Sven
Reply


Messages In This Thread
ContentHandler and PostData - by svenheuer - 03-21-2023, 11:17 AM
RE: ContentHandler and PostData - by svenheuer - 03-22-2023, 08:56 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)