Solved

simple question about HttpQueryInfo  (i think)

Posted on 2004-08-25
5
216 Views
Last Modified: 2010-04-05
I am using HttpQueryInfo within a routine that uses WinInet to obtain http header information.

My question is: If i use HttpQueryInfo twice - ie: to get the status code and then call it again to get the status text, is this creating extra issues on the server side...ie: 2 hits?  Or am i missing the point altogether?

I have read as much as i can about Wininet on the microsoft site - which was not very clear in parts - so i am hoping that using HttpQueryInfo several times to obtain header information is not going to make my program "unfriendly" to servers out there.

Can anyone enlighten on all of this?
0
Comment
Question by:foxjax
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:Molando
ID: 11890319
You hsuold be able to do a:
 HTTP_QUERY_STATUS_CODE or HTTP_QUERY_STATUS_TEXT, for the dwInfoLevel and recieve them both at once.
Though there is no big problem if you make two requests.
0
 
LVL 2

Accepted Solution

by:
Molando earned 500 total points
ID: 11890330
wish I could type,
have your second param as:  HTTP_QUERY_STATUS_CODE or HTTP_QUERY_STATUS_TEXT. dwInfoLevel is a combination of flags.
0
 

Author Comment

by:foxjax
ID: 11895996
HTTP_QUERY_STATUS_CODE or HTTP_QUERY_STATUS_TEXT doesn't seem to work for me in the code i have been using.

I don't seem to be able to get the information back unless i call HttpQueryInfo several times saving the information off each time....although it is most likely just me getting it wrong
0
 

Author Comment

by:foxjax
ID: 11918008
I am still unable to get both bits of information in one call using HTTP_QUERY_STATUS_CODE or HTTP_QUERY_STATUS_TEXT.

Anyone able to help?

I'll leave this question open for another day before closing it.
0
 

Author Comment

by:foxjax
ID: 11927604
Closing this question as fully unanswered

Will award Molando the points and a grade B.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now