You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
352 lines
16 KiB
352 lines
16 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (version 1.7.0_80) on Wed Nov 30 19:45:05 CET 2022 -->
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>SetCookie (Apache HttpComponents Client 4.5.14 API)</title>
|
|
<meta name="date" content="2022-11-30">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="SetCookie (Apache HttpComponents Client 4.5.14 API)";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar_top">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/SetCookie.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../org/apache/http/cookie/MalformedCookieException.html" title="class in org.apache.http.cookie"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../../org/apache/http/cookie/SetCookie2.html" title="interface in org.apache.http.cookie"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?org/apache/http/cookie/SetCookie.html" target="_top">Frames</a></li>
|
|
<li><a href="SetCookie.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">org.apache.http.cookie</div>
|
|
<h2 title="Interface SetCookie" class="title">Interface SetCookie</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Superinterfaces:</dt>
|
|
<dd><a href="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</a></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt>All Known Subinterfaces:</dt>
|
|
<dd><a href="../../../../org/apache/http/cookie/SetCookie2.html" title="interface in org.apache.http.cookie">SetCookie2</a></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt>All Known Implementing Classes:</dt>
|
|
<dd><a href="../../../../org/apache/http/impl/cookie/BasicClientCookie.html" title="class in org.apache.http.impl.cookie">BasicClientCookie</a>, <a href="../../../../org/apache/http/impl/cookie/BasicClientCookie2.html" title="class in org.apache.http.impl.cookie">BasicClientCookie2</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public interface <span class="strong">SetCookie</span>
|
|
extends <a href="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</a></pre>
|
|
<div class="block">This interface represents a <code>Set-Cookie</code> response header sent by the
|
|
origin server to the HTTP agent in order to maintain a conversational state.
|
|
<p>
|
|
Please do not use methods marked as @Obsolete. They have been rendered
|
|
obsolete by RFC 6265</div>
|
|
<dl><dt><span class="strong">Since:</span></dt>
|
|
<dd>4.0</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../org/apache/http/cookie/SetCookie.html#setComment(java.lang.String)">setComment</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> comment)</code>
|
|
<div class="block">If a user agent (web browser) presents this cookie to a user, the
|
|
cookie's purpose will be described using this comment.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../org/apache/http/cookie/SetCookie.html#setDomain(java.lang.String)">setDomain</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> domain)</code>
|
|
<div class="block">Sets the domain attribute.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../org/apache/http/cookie/SetCookie.html#setExpiryDate(java.util.Date)">setExpiryDate</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a> expiryDate)</code>
|
|
<div class="block">Sets expiration date.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../org/apache/http/cookie/SetCookie.html#setPath(java.lang.String)">setPath</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> path)</code>
|
|
<div class="block">Sets the path attribute.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../org/apache/http/cookie/SetCookie.html#setSecure(boolean)">setSecure</a></strong>(boolean secure)</code>
|
|
<div class="block">Sets the secure attribute of the cookie.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../org/apache/http/cookie/SetCookie.html#setValue(java.lang.String)">setValue</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../org/apache/http/cookie/SetCookie.html#setVersion(int)">setVersion</a></strong>(int version)</code>
|
|
<div class="block">Sets the version of the cookie specification to which this
|
|
cookie conforms.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods_inherited_from_class_org.apache.http.cookie.Cookie">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from interface org.apache.http.cookie.<a href="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</a></h3>
|
|
<code><a href="../../../../org/apache/http/cookie/Cookie.html#getComment()">getComment</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#getCommentURL()">getCommentURL</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#getDomain()">getDomain</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#getExpiryDate()">getExpiryDate</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#getName()">getName</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#getPath()">getPath</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#getPorts()">getPorts</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#getValue()">getValue</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#getVersion()">getVersion</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#isExpired(java.util.Date)">isExpired</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#isPersistent()">isPersistent</a>, <a href="../../../../org/apache/http/cookie/Cookie.html#isSecure()">isSecure</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="setValue(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setValue</h4>
|
|
<pre>void setValue(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="setComment(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setComment</h4>
|
|
<pre>@Obsolete
|
|
void setComment(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> comment)</pre>
|
|
<div class="block">If a user agent (web browser) presents this cookie to a user, the
|
|
cookie's purpose will be described using this comment.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>comment</code> - </dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/http/cookie/Cookie.html#getComment()"><code>Cookie.getComment()</code></a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setExpiryDate(java.util.Date)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setExpiryDate</h4>
|
|
<pre>void setExpiryDate(<a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a> expiryDate)</pre>
|
|
<div class="block">Sets expiration date.
|
|
<p><strong>Note:</strong> the object returned by this method is considered
|
|
immutable. Changing it (e.g. using setTime()) could result in undefined
|
|
behaviour. Do so at your peril.</p></div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>expiryDate</code> - the <a href="https://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a> after which this cookie is no longer valid.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/http/cookie/Cookie.html#getExpiryDate()"><code>Cookie.getExpiryDate()</code></a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setDomain(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setDomain</h4>
|
|
<pre>void setDomain(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> domain)</pre>
|
|
<div class="block">Sets the domain attribute.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>domain</code> - The value of the domain attribute</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/http/cookie/Cookie.html#getDomain()"><code>Cookie.getDomain()</code></a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setPath(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setPath</h4>
|
|
<pre>void setPath(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> path)</pre>
|
|
<div class="block">Sets the path attribute.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - The value of the path attribute</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/http/cookie/Cookie.html#getPath()"><code>Cookie.getPath()</code></a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setSecure(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setSecure</h4>
|
|
<pre>void setSecure(boolean secure)</pre>
|
|
<div class="block">Sets the secure attribute of the cookie.
|
|
<p>
|
|
When <code>true</code> the cookie should only be sent
|
|
using a secure protocol (https). This should only be set when
|
|
the cookie's originating server used a secure protocol to set the
|
|
cookie's value.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>secure</code> - The value of the secure attribute</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/http/cookie/Cookie.html#isSecure()"><code>Cookie.isSecure()</code></a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setVersion(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>setVersion</h4>
|
|
<pre>@Obsolete
|
|
void setVersion(int version)</pre>
|
|
<div class="block">Sets the version of the cookie specification to which this
|
|
cookie conforms.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>version</code> - the version of the cookie.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/http/cookie/Cookie.html#getVersion()"><code>Cookie.getVersion()</code></a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar_bottom">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/SetCookie.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../org/apache/http/cookie/MalformedCookieException.html" title="class in org.apache.http.cookie"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../../org/apache/http/cookie/SetCookie2.html" title="interface in org.apache.http.cookie"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?org/apache/http/cookie/SetCookie.html" target="_top">Frames</a></li>
|
|
<li><a href="SetCookie.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>Copyright © 1999–2022 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
|
|
</body>
|
|
</html>
|