我对python一无所知,但这项任务已分配给我。目前我是 WebClient 并使用获取字符串来接收 XML,但我需要使用 POST。
我需要发帖而不是读回 XML,我当前的代码:
postUrl = 'http://sitetopost.net/checkduplicateemail?TransactionType=NoCharge&CampaignId=47750&SubCampaignId=6010117&BundleId=' + bundleId + '&PackageDealId=' + packageDealId + '&OrganizationId=e11b4f9e-be9a-464f-96b0-885a571e3cc9&FirstName=' + firstName + '&LastName=' + lastName + '&EmailAddress=' + email + '&Phone=' + phone + '&IPAddress=[=$Registration.IpAddress=]&Address1=' + address + '&Address2=' + address2 + '&City=' + city + '&ProvinceAbbreviation=' + state + '&PostalCode=' + postalcode + '&order_OriginatorId=6&order_OriginatorOrderIdentifier=1234567&userinfo_ProductWebUserName=&userinfo_ProductWebUserPassword='
contentTemplate = Sel.GetHtmlContentTemplateHtmlByName(path.Meme, contentPage)
client = WebClient()
billResponse = client.DownloadString(postUrl)
xml = XElement.Parse(billResponse)
Logger.Trace("XML: {0}", billResponse)
我怎样才能把它变成一个帖子?谢谢!