Re: [Cppcms-users] 502 Bad Gateway after Xhr posting plain text and some more questions
Brought to you by:
artyom-beilis
From: Artyom <art...@ya...> - 2010-04-30 13:59:07
|
Hello, > > Few notes: > > > > 1st you need to send POST request in form > message=ssssss (meaning > > it expects "Form" behavior" > > > > Yes, I saw that. But what if I need just the content of the > post which > is not "Form" behavior. > For example, sending json object without "message" name for > it? > You can access post data directly using raw_post_data() member function of http::request(). std::pair<void *,size_t> post_data = request().raw_post_data(); And analyze this. ------------------- BTW Json: CppCMS 1.x.x supports JSON-RPC as well... You may find an example of usage in tests/jsonrpc_test.cpp Best, Artyom |