تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] مشكل في request
#1
السلام عليكم احبابي في الله 
ان شاء الله تكونو بألف خير

عندي ركويست ب httpwebrequest
اريد استعمالها ب httpclient

هذه هي الركويست
كود :
       Net.ServicePointManager.CheckCertificateRevocationList = False : Net.ServicePointManager.DefaultConnectionLimit = 300 : Net.ServicePointManager.UseNagleAlgorithm = False : Net.ServicePointManager.Expect100Continue = False : Net.ServicePointManager.SecurityProtocol = 3072
       Dim Encoding As New Text.UTF8Encoding
       Dim Bytes As Byte() = Encoding.GetBytes("CAES+w8SRgpECh4IARIQxzwvXOKRWxt2Qalfig1cmxoAIgAqAlNEMgAQARogOTBFNUIxNTZCMkRENTlBNzAwMDAwMDAwMDAwMDAwMDAYASCJxNeFBjAVOM68qbIPQqAPChRsaWNlbnNlLndpZGV2aW5lLmNvbRIQFwW5F8wSBIaLBjM6L3cqjBrgDAthDJmmuBiDS7i3bdonE+12F/YJEQ1eGq277IqRHXWZOjTxGVIJk5zBqImmun3FTCeb9gZ9xD69oGxwTZgFft34dOjOr2+cMGaON5MHm5ZA5vKruB9qKtlMMHHUkYXLiTkacESMNV9osJtWo+bDk5PhP7XpRifGkzPMj/eBJZWV/V2/MtHKc1QbA6uPa+07DAIsvAzc0VIJLFSvBoQmYdS6pmvG2BVM66y3JJJ7YghcuTPrgMlt2RrK5aBsCcHDB9z7GSq33ZNR56ZmFWxZgEHoK+0MAbHOBrlsYEzU6JK8gEmvNoDimIjl7FXYr5MCzuR18YV3Jc8DBrJQCJgboTuzNgScejj9G/0CSQ20r290hLF5GY1NfgZPHSCTO07iIStn4q97+eRbh4UFpz2T8AxOPR0Xi86ufdfUCNQ/XabyH7zzzgIm7zqHGi/KeEftOFVRT1imnQVFhgSVAOQsAM0hNSx6GPqLJZs4SQ+94gy+qV8VNteRv8t1cw1/vnopZIcRx6kC5L0rbuSTL5CJoe/ujkPD14rwoiwlYTLTiSJu2d6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5Xp6ZeyZuftbCrLaGXXmUGCV+CDSwP1KftYQ+jKD4l9UphLaccfanwKueMiu4YFXjrbJ7FxYYYJIVuPRM2v73/Eah/Jgr3XpnbBfp5iyE+t1LlHm3BBu8UUVYcKFw60E/vbr1OHuKR1vTli6zHm5ZoGGCYMI0m9iKuVKI9CYbKFUG")
       Dim AJ As Net.HttpWebRequest = DirectCast(Net.WebRequest.Create("https://proxies-beinmena.portail.alphanetworks.be/arkena/askLicenseWV?idChannel=67&playerName=viaccessapp&playerVersion=08.07.10&checksum=Spo%2BXnWsa7s8lZmUe5BuFJfoRUmZA42Zt57LftAxJgM%3D"), Net.HttpWebRequest)
       With AJ
           .Method = "POST"
           .Proxy = Nothing
           .Host = "proxies-beinmena.portail.alphanetworks.be"
           .Accept = "*/*"
           .ContentType = "application/octet-stream"
           .Headers.Add("X-AN-WebService-CustomerAuthToken: eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI5NDcxMzI0MS0wN2IwLTQzNjctOWNlOS0zNjUzN2E3ZWEyYzYiLCJzdWIiOiI2NzU5MDYxIiwiaWRfc2Vzc2lvbiI6ImM2NmZhNTI0LTE5YmYtMzE0OC1iYWI0LWJjZWJmZGUxMTdhMiIsImF1dGhvcml0aWVzIjpbIkVuZFVzZXJSb2xlIl0sImFwaXAiOiIxMDUuMTA1LjE4My44MCIsImNsaWVudF9pZCI6InRMcGl0UmlybHBob2ZhY2xodXN0bHppU3BpV2V3cmw5IiwiaWF0IjoxNjIyNTI1NDE0LCJleHAiOjE2MjI1Mzk4MTQsImlkX3NzbyI6NTYzNjY5LCJpZF9kZXZpY2UiOiIxbmVadjF2TzFBVktlMldveXk3bnVnPT0ifQ.ui3l71phLrjW5ICX2xX-L7ptKzzKgXG7Ht-Kx8V5mRPH1zCfxBLQ453lBlDY57LlA4Sl9Wkn-Ugc1m7_LodqGpnIpMnIe41T-vY9xsiFn6RdG-xFzPnX9JRGh5p51XgWTI98rjTbXyHPRbVePNPXmIIYRYHFSPt6nkEHxPs-al-nttUKltaMD9hzDQ0BqTFwKiI5i04w_gw39wPVgnyY79FnI5w_vkvK21idjINSH1DzR4nWeVpaxOvZb1jNh8FdaCup3ngI07axwxHPeIqY4CGx_iu2-4m50mf0aHjBLzpmgeCnObLr-wOaGVAFPkk5QyGQcOEKzrrfG8Oia45_yQ")
           .Headers.Add("X-AN-WebService-IdentityKey: tLpitRirlphofaclhustlziSpiWewrl9")
           .UserAgent = "VO Player"
           .ContentLength = Bytes.Length
       End With
       Dim Stream As IO.Stream = AJ.GetRequestStream() : Stream.Write(Bytes, 0, Bytes.Length) : Stream.Dispose() : Stream.Close()
       Dim Reader As New IO.StreamReader(DirectCast(AJ.GetResponse(), Net.HttpWebResponse).GetResponseStream()) : Dim Text As String = Reader.ReadToEnd : Reader.Dispose() : Reader.Close()


و هذه محاولتي ارجو التعديل عليها و شكرااااا

كود :
       Dim handler = New HttpClientHandler()
       handler.Proxy = Nothing
       Dim client = New HttpClient(handler)
       client.DefaultRequestHeaders.Add("User-Agent", "VO Player")
       client.DefaultRequestHeaders.Add("X-AN-WebService-CustomerAuthToken", "eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI5NDcxMzI0MS0wN2IwLTQzNjctOWNlOS0zNjUzN2E3ZWEyYzYiLCJzdWIiOiI2NzU5MDYxIiwiaWRfc2Vzc2lvbiI6ImM2NmZhNTI0LTE5YmYtMzE0OC1iYWI0LWJjZWJmZGUxMTdhMiIsImF1dGhvcml0aWVzIjpbIkVuZFVzZXJSb2xlIl0sImFwaXAiOiIxMDUuMTA1LjE4My44MCIsImNsaWVudF9pZCI6InRMcGl0UmlybHBob2ZhY2xodXN0bHppU3BpV2V3cmw5IiwiaWF0IjoxNjIyNTI1NDE0LCJleHAiOjE2MjI1Mzk4MTQsImlkX3NzbyI6NTYzNjY5LCJpZF9kZXZpY2UiOiIxbmVadjF2TzFBVktlMldveXk3bnVnPT0ifQ.ui3l71phLrjW5ICX2xX-L7ptKzzKgXG7Ht-Kx8V5mRPH1zCfxBLQ453lBlDY57LlA4Sl9Wkn-Ugc1m7_LodqGpnIpMnIe41T-vY9xsiFn6RdG-xFzPnX9JRGh5p51XgWTI98rjTbXyHPRbVePNPXmIIYRYHFSPt6nkEHxPs-al-nttUKltaMD9hzDQ0BqTFwKiI5i04w_gw39wPVgnyY79FnI5w_vkvK21idjINSH1DzR4nWeVpaxOvZb1jNh8FdaCup3ngI07axwxHPeIqY4CGx_iu2-4m50mf0aHjBLzpmgeCnObLr-wOaGVAFPkk5QyGQcOEKzrrfG8Oia45_yQ")
       client.DefaultRequestHeaders.Add("X-AN-WebService-IdentityKey", "tLpitRirlphofaclhustlziSpiWewrl9")
       client.DefaultRequestHeaders.Add("Host", "proxies-beinmena.portail.alphanetworks.be")
       Dim data As String = "CAES+w8SRgpECh4IARIQxzwvXOKRWxt2Qalfig1cmxoAIgAqAlNEMgAQARogOTBFNUIxNTZCMkRENTlBNzAwMDAwMDAwMDAwMDAwMDAYASCJxNeFBjAVOM68qbIPQqAPChRsaWNlbnNlLndpZGV2aW5lLmNvbRIQFwW5F8wSBIaLBjM6L3cqjBrgDAthDJmmuBiDS7i3bdonE+12F/YJEQ1eGq277IqRHXWZOjTxGVIJk5zBqImmun3FTCeb9gZ9xD69oGxwTZgFft34dOjOr2+cMGaON5MHm5ZA5vKruB9qKtlMMHHUkYXLiTkacESMNV9osJtWo+bDk5PhP7XpRifGkzPMj/eBJZWV/V2/MtHKc1QbA6uPa+07DAIsvAzc0VIJLFSvBoQmYdS6pmvG2BVM66y3JJJ7YghcuTPrgMlt2RrK5aBsCcHDB9z7GSq33ZNR56ZmFWxZgEHoK+0MAbHOBrlsYEzU6JK8gEmvNoDimIjl7FXYr5MCzuR18YV3Jc8DBrJQCJgboTuzNgScejj9G/0CSQ20r290hLF5GY1NfgZPHSCTO07iIStn4q97+eRbh4UFpz2T8AxOPR0Xi86ufdfUCNQ/XabyH7zzzgIm7zqHGi/KeEftOFVRT1imnQVFhgSVAOQsAM0hNSx6G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xx25rZ91BAki9JYjczxsWMMxeRgZA/8l4CBqDmHy7v9qXXDfwWtoF7PUSyqclAsUSwqojnYxN85FPnujJhEyeL5Xp6ZeyZuftbCrLaGXXmUGCV+CDSwP1KftYQ+jKD4l9UphLaccfanwKueMiu4YFXjrbJ7FxYYYJIVuPRM2v73/Eah/Jgr3XpnbBfp5iyE+t1LlHm3BBu8UUVYcKFw60E/vbr1OHuKR1vTli6zHm5ZoGGCYMI0m9iKuVKI9CYbKFUG"

       Dim response = Await client.PostAsync("https://proxies-beinmena.portail.alphanetworks.be/arkena/askLicenseWV?idChannel=67&playerName=viaccessapp&playerVersion=08.07.10&checksum=Spo%2BXnWsa7s8lZmUe5BuFJfoRUmZA42Zt57LftAxJgM%3D", New StringContent(data, Encoding.UTF8, "application/x-www-form-urlencoded"))
       response.EnsureSuccessStatusCode()
       Dim resp = Await response.Content.ReadAsByteArrayAsync()
الرد
تم الشكر بواسطة:



التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم