SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Apprentice
    Join Date
    Nov 2012
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Question send multiple requests using "WinHttp.WinHttpRequest.5.1

    i want to send multiple requests using "WinHttp.WinHttpRequest.5.1" , kindly help me in this regard

  2. #2
    Apprentice
    Join Date
    Nov 2012
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    any help in this regard plz?

  3. #3
    Member
    Join Date
    Jan 2008
    Posts
    336
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Check the below links may help:
    http://www.sqaforums.com/showflat.ph...86&Main=446846
    http://www.learnqtp.com/forums/Threa...request-in-qtp,

    You can write your own code to loop multiple request and response validations.

    We can help you better, if you have sample application with Test Data.

  4. #4
    Apprentice
    Join Date
    Nov 2012
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Thanks a lot Udhay

    if i want to send multiple requests, i can use like the below method?is it right one

    WinHttpReq.SetRequestHeader "Content-Type", "text/xml;charset=utf-8"
    WinHttpReq.SetRequestHeader "Accept", "text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
    WinHttpReq.SetRequestHeader "Content-Transfer-Encoding", "binary"
    WinHttpReq.SetRequestHeader "Connection", "keep-alive"

  5. #5
    Member
    Join Date
    Jan 2008
    Posts
    336
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    1. Dim WinHttpReq
    2. Const HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0
    3. Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
    4. WinHttpReq.Open "POST",[your url request], False
    5. WinHttpReq.setRequestHeader "Content-Type", "text/xml;charset=utf-8"
    6 WinHttpReq.setRequestHeader "Accept", "text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
    7 WinHttpReq.setRequestHeader "Content-Transfer-Encoding", "binary"
    8 WinHttpReq.setRequestHeader "Connection", "keep-alive"
    9 WinHttpReq.SetCredentials [UserName], [PassWord], HTTPREQUEST_SETCREDENTIALS_FOR_SERVER
    10 WinHttpReq.Send([yourXML])
    11 Msgbox WinHttpReq.ResponseText
    Set WinHttpReq = Nothing

    This is the sample code posted right? place your values in the content between "[]" i.e in line 4, 9, 10.

  6. #6
    New Member
    Join Date
    Mar 2016
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    this can be done easily with http://gist.github.com/arunimarastogi/tool

    Quote Originally Posted by udayanem View Post
    1. Dim WinHttpReq
    2. Const HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0
    3. Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
    4. WinHttpReq.Open "POST",[your url request], False
    5. WinHttpReq.setRequestHeader "Content-Type", "text/xml;charset=utf-8"
    6 WinHttpReq.setRequestHeader "Accept", "text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
    7 WinHttpReq.setRequestHeader "Content-Transfer-Encoding", "binary"
    8 WinHttpReq.setRequestHeader "Connection", "keep-alive"
    9 WinHttpReq.SetCredentials [UserName], [PassWord], HTTPREQUEST_SETCREDENTIALS_FOR_SERVER
    10 WinHttpReq.Send([yourXML])
    11 Msgbox WinHttpReq.ResponseText
    Set WinHttpReq = Nothing

    This is the sample code posted right? place your values in the content between "[]" i.e in line 4, 9, 10.

    [This can be achieved easily by following tool: https://github.com/arunimarastogi/tool]

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:32 AM.

Copyright BetaSoft Inc.