Add more debug statements around forms.

This commit is contained in:
tastytea 2019-08-21 03:35:44 +02:00
parent f97608ecfa
commit bc58a977f0
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 4 additions and 0 deletions

View File

@ -194,6 +194,7 @@ return_call API::http::request_common(const http_method &meth,
{
// TODO: Test form submit.
// TODO: Change maptoformdata() and so on.
ttdebug << "Size of HTMLForm is " << formdata->size() << '\n';
formdata->prepareSubmit(request);
}

View File

@ -113,6 +113,8 @@ const string API::maptostr(const parameters &map, const bool &firstparam)
unique_ptr<HTMLForm> API::maptoformdata(const parameters &map)
{
ttdebug << "Transforming Mastodon::parameters to Poco::Net::HTMLForm.\n";
unique_ptr<HTMLForm> formdata =
make_unique<HTMLForm>(HTMLForm::ENCODING_MULTIPART);
@ -124,6 +126,7 @@ unique_ptr<HTMLForm> API::maptoformdata(const parameters &map)
for (const auto &it : map)
{
string key = it.key;
ttdebug << "Processing \"" + key + "\".\n";
// TODO: Test nested parameters.
if (const size_t pos = key.find('.') != string::npos)