Define Encoding GET at httpSocket

Hi all!

I have a webpage that I consult, it’s an Http Secure webpage.
So I use an HTTPSecureSocket, and GET to pass the URL desired in order to get back the result as a “Text”

That’s a copy of my code:

[code] Dim URLValidador As String = "https://verificacfdi.facturaelectronica.sat.gob.mx/?" _

  • “ctl00%24ScriptManager1=ctl00%24MainContent%24UpnlBusqueda%7” _
  • “Cctl00%24MainContent%24BtnBusqueda&” _
  • “__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=XSYWXINYzkqMy” _
  • “Ag7BU0bVxd6Ah5zsaE1uO4d5fW6ZGKJvJ%2B%2B3Xj2DaVyi14esMzcNC5” _
  • “57M%2FmvGLtRk3KvyUp8DPxwURM%2F%2FysqRQYJ8VX9refDcD2vTnVAew” _
  • “%2Bghu86SpuICsoIJ9BdRuH7jFciEAV11FozYCUv1YPL10aIY2Qx%2FrITOdm7” _
  • “RvaK0mfT153MdODL9uKEvCeMiDf7iAJ%2Fi65mbyIhIyIDe4EFrexUxIm5C7%2” _
  • “FEGHjoUPwiO8u4ufmn%2By%2B056EHK0cPMqaqB1NqyXLkxu%2Ft6u0KN6b5” _
  • “pEDFw6mcQMqz%2Bgk29RiGjmx86h0GAu%2FyRiIdNisZnIIARbnnozrZOYN8llUL” _
  • “xw7gPnyiWYm6mun6KSH&__VIEWSTATEGENERATOR=CA0B0334&” _
  • “__VIEWSTATEENCRYPTED=&” _
  • “ctl00%24MainContent%24TxtUUID=” + txtUUID.text + “&” _
  • “ctl00%24MainContent%24TxtRfcEmisor=” + txtRFCemisor.Text + “&” _
  • “ctl00%24MainContent%24TxtRfcReceptor=” + txtRFCreceptor.text + “&” _
  • “ctl00%24MainContent%24TxTCaptchaNumbers=66740&” _
  • “__ASYNCPOST=true&ctl00%24MainContent%24BtnBusqueda=Verificar%20CFDI”

Dim http As New HTTPSecureSocket
TextArea1.text = http.Get(URLValidador, 30)
TextArea1.text = TextArea1.text.DefineEncoding(Encodings.utf8)
textarea1.Refresh[/code]

I wanna apply it Encoding UTF8, cuz I see black diamonds with an interrogation symbol, as when encoding its not properly setup.
So I applied the encoding after use GET, but without results.

What should I’m doing wrong?
Regards

I solved, Thats what i done:

Dim http As New HTTPSecureSocket TextArea1.text = http.Get(URLValidador, 30).DefineEncoding(Encodings.utf8)

So I can visualize my Text properly!!!
Thanks