Advertisement
Guest User

Untitled

a guest
Sep 25th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.02 KB | None | 0 0
  1.   'PROCESSA PAGINA
  2.                                            Dim postData As String = "codCarrinho=&" & IDPrincial & ":btProsseguir=Continuar&" & LoginFormName(X) & "=&" & IDPrincial & ":password=" & Lista.Items(0).SubItems(1).Text & "&" & IDPrincial & ":username=" & Lista.Items(0).Text & "&flow=&paramIngresso=&subviagens=&suggestAddressUpdate="
  3.                                            Dim encoding As New UTF8Encoding
  4.                                            Dim byteData As Byte() = encoding.GetBytes(postData)
  5.                                            Dim postReq As HttpWebRequest = DirectCast(WebRequest.Create("https://carrinho.americanas.com.br/CustomerWeb" & LoginFormAction(X)), HttpWebRequest)
  6.                                            postReq.Method = "POST"
  7.                                            postReq.KeepAlive = True
  8.                                            postReq.CookieContainer = Cookies
  9.                                            postReq.Referer = "https://minhaconta.americanas.com.br/#/customer/home"
  10.                                            postReq.ContentType = "application/x-www-form-urlencoded"
  11.                                            postReq.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36"
  12.                                            postReq.ContentLength = byteData.Length
  13.  
  14.                                            Dim postreqstream As Stream = postReq.GetRequestStream()
  15.                                            postreqstream.Write(byteData, 0, byteData.Length)
  16.                                            postreqstream.Close()
  17.                                            Dim postresponse As HttpWebResponse
  18.  
  19.                                            postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
  20.                                            Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
  21.                                            Dim XX As String = postreqreader.ReadToEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement