Results 1 to 6 of 6

Thread: HTTP headers

  1. #1
    Join Date
    Jan 2009
    Posts
    57

    HTTP headers

    Hello, I want to know the some or the other details about the HTTP headers. I want this details for my own knowledge. I am not having more details on it, and want to know this for my own purpose. If anyone is having details about it, then please provide me that. It will be helpful to me. I have search on internet. But, not find more and useful details about it. If you are having some coding related to it, then please reply me that also.

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: HTTP headers

    If you want to retrieve the HTTP Headers then you can get that with the use of the Constant as below:
    • For using the HttpQueryInfo function for getting the HTTP header with the help of the constant you need to make use of the steps below:
    • First it is necessary to call the HttpQueryInfo by the use of the Attributes list, a NULL buffer, and the variable which takes buffer size set to zero. For particular format data you can simply use the constant from the modifier list.
    • If the header which is requested exist then call to HttpQueryInfo should fail and GetLastError should return ERROR_INSUFFICIENT_BUFFER and the parameter which is passed for the lpdwBufferLength set to the bytes required.
    • Now you need to set the buffer with the total bytes required.
    • Now you can try again for calling the HttpQueryInfo.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: HTTP headers

    Hello, I have got the one code related to the HTTP header in the book. From that you may able to get the knowledge about the coding of the http header. So, just make use of it and you will able to get the implementation of it.
    Code:
    xml version ="1.0" encoding ="UTF-8"?>
    <beans xmlns ="http://www.techarena.in/schema/beans"
    	xmlns: xsi ="http://www.forums.techarena.in /2001/XMLSchema-instance" xmlns: context ="http://www.techarena.in/schema/context"
    	xsi: schemaLocation ="
    http://www.techarena.in/schema/beans http://www.techarena.in/schema/beans/spring-beans-2.0.xsd
    http://www.techarena.in/schema/context http://www.techarena.in/schema/context/spring-context-2.5.xsd ">
    
    <bean id ="titi" class="Titi" />
    
    <bean id ="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
    <property name ="serviceUrl" value ="http://myurl/ ..." />
    <property name ="serviceInterface" value ="MyInterface" />
    
    <property name ="httpInvokerRequestExecutor">
    <ref bean ="titi" />
    </ property>
    </ bean>
    
    </ beans>

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: HTTP headers

    Hello, we all know that the HTTP is the abbreviation for the "Hypertext Transfer Protocol". As we know that the World wide web works on this protocol. Whatever we will see in the browser is transmitted to the computer through the HTTP. In this if you consider the HTTP headers then it is the core part of the requests and responses from the HTTP. It will simply move the data to the client browser from the requested page and the server and more.

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: HTTP headers

    Hello, you can simply make use of the code below for getting more knowledg about the HTTP headers. It is quiet simple code to understand. Make use of it.
    Code:
    import java.io.IOException;
     
    import org.apache.commons.httpclient.Header;
    import org.apache.commons.httpclient.cookie.CookiePolicy;
    import org.apache.commons.httpclient.methods.PostMethod;
    import org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor;
    import org.springframework.remoting.httpinvoker.HttpInvokerClientConfiguration;
     
    Public class Titi extends CommonsHttpInvokerRequestExecutor 
    {
    private Final ThreadLocal <String> ThreadLocal = new ThreadLocal <String>();
     @ Override protected PostMethod createPostMethod(Final HttpInvokerClientConfiguration config) throws IOException 
    {
     Final String = ppauth ThreadLocal.get();
    if (ppauth == null) 
    {
    throw new RuntimeException("No authentication cookie found for this query?");
    }
    Final PostMethod post = great.createPostMethod(config);
    post.getParams().setCookiePolicy(CookiePolicy.IGNORE_COOKIES);
    post.setRequestHeader(new Header("Cookie", "ppauth =" + Ppauth));
    return post;
    }
    Public void setPPAuthCookie(Final String cookie) 
    {
    ThreadLocal.set(Cookie);
    }
    }

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    Re: HTTP headers

    Hello, you can make use of the books below for getting more advanced knowledge in the HTTP headers. So, just make use of them:
    • HTTP: the definitive guide
    • HTTP pocket reference
    • HTTP developer's handbook

Similar Threads

  1. How to fix HTTP error 307 Temporary Redirect (since HTTP/1.1)?
    By Charu Sharma in forum Networking & Security
    Replies: 6
    Last Post: 05-04-2012, 01:14 AM
  2. HTTP: 12029 no HTTP access for IE
    By Captainlumpy in forum Windows XP Support
    Replies: 5
    Last Post: 29-07-2010, 06:43 AM
  3. How to create headers in wordpad
    By Jiten W in forum Windows Software
    Replies: 3
    Last Post: 17-08-2009, 01:41 PM
  4. Headers and Sources in C++
    By Hamir in forum Software Development
    Replies: 3
    Last Post: 19-02-2009, 11:16 AM
  5. PHP Headers already sent by
    By Hattie in forum Tips & Tweaks
    Replies: 0
    Last Post: 19-12-2008, 06:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,550,391.08656 seconds with 17 queries