Hi Alex, Thanks for the reply. I read smsc_http.c. And found: client = http_accept_request(conndata->port, &ip, &url, &headers, &body, &cgivars); in: static void httpsmsc_receiver(void *arg) {..}
And called by: static void telco_receive_sms(SMSCConn *conn, HTTPClient *client, List *headers, Octstr *body, List *cgivars) {..} If we try to read GET value then I just simply use: param = http_cgi_variable(cgivars, "param"); But when we try to read POST value then what function I must use? I understand the 'body' contains the values. But I don't know how to call all parameters and grab each value. I tried dirty way: param = http_cgi_variable(body, "param"); And it cause segmentation fault. Can you tell me how? TIA. Willy On Tue, 2008-11-18 at 09:59 +0100, Alexander Malysh wrote: > Hi, > > you use: > HTTPClient *http_accept_request(int port, Octstr **client_ip, > Octstr **url, List **headers, Octstr > **body, > List **cgivars); > > to get request and body is what you are looking for for POST. > > Thanks, > Alex > > sangprabv schrieb: > > Hi, > > I'm developing a custom HTTP SMS and I see Octstr > > *http_cgi_variable(List *list, char *name); in http.h. Does this > > function usable for GET and POST method for MO message > > (telco_receive_sms()) in smsc_http.c? Or what function I must use to > > grab POST value method in HTTP SMSC. TIA > > > > > > Willy > > > > > > > >