Вот мой код не пост возрашает пусто
Код:
StringBuilder sb = new StringBuilder();
string boundary = DateTime.Now.Ticks.ToString();
string newLine = "\r\n";
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"retpath\"" + newLine + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("http://my.yandex.ru/" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"journal-type\"" + newLine + newLine);
sb.Append("yaru" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"head-background\"" + newLine + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"main-color\"" + newLine + newLine);
sb.Append("#f1f1f1" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"second-color\"" + newLine + newLine);
sb.Append("#e3e3e3" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"background-color\"" + newLine + newLine);
sb.Append("#f9f9f9" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"text-color\"" + newLine + newLine);
sb.Append("#000000" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"header-color\"" + newLine + newLine);
sb.Append("#000000" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"subheader-color\"" + newLine + newLine);
sb.Append("#000000" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"birth_day\"" + newLine + newLine);
sb.Append("00" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"birth_month\"" + newLine + newLine);
sb.Append("00" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"birth_year\"" + newLine + newLine);
sb.Append("0000" + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"title\"" + newLine + newLine);
sb.Append(name + " " + sur + newLine);
sb.Append("-----------------------------" + boundary + newLine);
sb.Append("Content-Disposition: form-data; name=\"sex\"" + newLine + newLine);
sb.Append("man" + newLine);
sb.Append("Content-Disposition: form-data; name=\"city\"" + newLine + newLine + newLine);
sb.Append("-----------------------------" + boundary + "--");
string postData1 = sb.ToString();
httpClient.ContentType = "multipart/form-data";
post = httpClient.Post("http://my.ya.ru/registration_simple_do_options.xml", postData1);