How to add cookie_html/css_WEB-ITnose in http request header

WBOY
Release: 2016-06-24 12:25:09
Original
3431 people have browsed it

The situation is like this:

I wrote an http client myself, and when the url is set to http://www.google.com
the response packet prompts a 302 jump, I based on the location : The content of the request is set again after setting a new URL.
found that a cookie needs to be added.

The first response packet contains
Set-Cookie: PREF=ID=7a28369b5191088b:FF=0: NW=1:TM=1383805940:LM=1383805940:S=15jcEL6R0waCLZ5Y; expires=Sat, 07-Nov-2015 06:32:20 GMT; path=/; domain=.google.com

Can Set the cookie in the new request header based on this Set-Cookie? ? ?
How to set it up? PREF=ID=7a28369b5191088b:FF=0:NW=1:TM=1383805940:LM=1383805940:S=15jcEL6R0waCLZ5Y;Can’t understand what it is at all


Reply to the discussion (solution)

The situation is like this:

I wrote an http client myself, and when the url is set to http://www.google.com
the response packet prompts a 302 jump, I based on The content of location: sets a new URL and requests again.
found that a cookie needs to be added.

The first response packet contains
Set-Cookie: PREF=ID=7a28369b5191088b:FF=0 :NW=1:TM=1383805940:LM=1383805940:S=15jcEL6R0waCLZ5Y; expires=Sat, 07-Nov-2015 06:32:20 GMT; path=/; domain=.google.com

Me Can the cookie in the new request header be set based on this Set-Cookie? ? ?
How to set it up? PREF=ID=7a28369b5191088b:FF=0:NW=1:TM=1383805940:LM=1383805940:S=15jcEL6R0waCLZ5Y;I don’t understand what it is at all
You seem to have entered the wrong section! ! ! Go to the Web development module and ask! ! !

We have moved you to the web section!

We have moved you to the web section!
Thank you

source:php.cn
Previous article:How does an html file get the browser's userAgent when script is disabled? _html/css_WEB-ITnose Next article:How to center the background of
layer horizontally and vertically?_html/css_WEB-ITnose
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!