Hi Akshat,
Fundamentally the body of an HTTP request or response just comes in a series of bytes. It is up to you, most likely based on the Content-Type header, to figure out how to treat the data. With our http library at the lowest level you can directly get access to a stream of the http request/response body. Take a look at the API ::web::http::http_request::body(). On top of that we have convenience methods to help get the body into some commonly used data structures. These methods help for when dealing with strings, JSON objects, or raw vector of bytes. Take a look at the methods http_response::extract_string, http_response::extract_json, and http_response::extract_vector.
Thanks,
Steve
Fundamentally the body of an HTTP request or response just comes in a series of bytes. It is up to you, most likely based on the Content-Type header, to figure out how to treat the data. With our http library at the lowest level you can directly get access to a stream of the http request/response body. Take a look at the API ::web::http::http_request::body(). On top of that we have convenience methods to help get the body into some commonly used data structures. These methods help for when dealing with strings, JSON objects, or raw vector of bytes. Take a look at the methods http_response::extract_string, http_response::extract_json, and http_response::extract_vector.
Thanks,
Steve