Hi, I'm trying to use the example of HTTPClientExample which is posted on the forum nokia already. In the example, the body of the POST request is build like this:
MHTTPDataSupplier* dataSupplier = this;
iTransaction.Request().SetBody(*dataSupplier);
where my class is derived from MHTTPDataSupplier. But, in my case, I have to use the application/x-www-form-urlencoded content type and they(the documentation) say that I have to use the CHTTPFormEncoder instead of MHTTPDataSupplier to be able to encode the body. If I use the MHTTPDataSupplier, the return of the post is 'Bad Authentication'. And my code look like this:
CHTTPFormEncoder* data;
data = CHTTPFormEncoder::NewL();
data->AddFieldL(_L8("email"),_L8("mymail@domain.com"));
data->AddFieldL(_L8("Passwd"),_L8("mypass"));
data->AddFieldL(_L8("source"),_L8("example-1"));
data->AddFieldL(_L8("service"),_L8("cl"));
iTransaction.Request().SetBody(*data);
Which still givin' me the 'Bad Authetication' error. I think I might missing something..
Can any1 help?
[]'s, Ruy.



