<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>http web request Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/http-web-request/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/http-web-request/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Fri, 17 Oct 2025 02:02:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>http web request Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/http-web-request/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>HTTP POST in SSIS &#8211; Send data to Web API url</title>
		<link>https://zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 26 Nov 2015 00:02:02 +0000</pubDate>
				<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[http post]]></category>
		<category><![CDATA[http web request]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[ssis json source]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[ssis rest api task]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=195</guid>

					<description><![CDATA[<p>Introduction In our previous article we saw how to call REST API or SOAP Web Service in SSIS. In this article we will only focus how to perform HTTP POST in SSIS using RESTful approach. HTTP Protocol supports many methods also referred as verb (e.g. GET, PUT, POST, HEAD, DELETE). Based on this verb, target [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/">HTTP POST in SSIS &#8211; Send data to Web API url</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous article we saw <a href="//zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">how to call REST API or SOAP Web Service in SSIS</a>. In this article we will only focus how to perform <strong>HTTP POST in SSIS</strong> using RESTful approach.</p>
<p>HTTP Protocol supports many methods also referred as verb (e.g. GET, PUT, POST, HEAD, DELETE). Based on this verb, target server (API server) can perform desired action. For example GET is usually used for read only data fetch (similar to select query in SQL). POST is usually used to create new record or update existing data.</p>
<p>For any HTTP operation you can submit parameters/data in 3 ways.</p>
<p>via URL query string<br />
via HTTP Headers<br />
via Body (Only valid for operations such as POST, PUT)</p>
<h2>HTTP POST in SSIS</h2>
<p>Traditionally whenever SSIS developers wanted to perform HTTP POST operation in SSIS they had to write <strong>C# Code using Script Task</strong>. This is no more case after ZappySys developed easy to use drag and drop REST API Tasks and Connectors. As of now there 4 main connectors/tasks which supports HTTP POST</p>
<ol>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">SSIS REST API Task</a></li>
<li><a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a></li>
<li><a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a></li>
</ol>
<p>SSIS PowerPack offers following two methods to POST data from your database to target API URL (e.g. SQL Server to API POST in JSON format).</p>
<h3>Method-1 : HTTP POST using Web API destination (In Data Flow)</h3>
<p>This method allows you to read data from any source and generate POST data and then submit to API endpoint using <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination</a>. Using this destination you can configure URL and API Body (e.g. JSON/XML document you want to submit) for each request. Check following screenshot to get idea how API POST works</p>
<p><strong>Step-By-Step : Video Tutorial</strong></p>
<a href="https://zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FzE6P5n744WU%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /><br />
<img decoding="async" class="figureimage" title="SSIS Web API Destination - POST JSON to REST API Endpoint, Create / Update records" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination-post-json-to-rest-api-url.png" alt="SSIS Web API Destination - POST JSON to REST API Endpoint, Create / Update records" /></p>
<p>You can also extract http response (i.e. JSON or XML) from Web API Destination and parse it into Rows and Columns using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a> like below. If you want to handle errors gracefully without stopping the execution then use error output (Drag red arrow from Web API destination and attach to downstream (Make sure you set Redirect for Error and Truncate both when prompted on attach)</p>
<p><img decoding="async" class="figureimage" title="SSIS Web API Destination - Configure Response output and Error output (Parse JSON response into rows and columns and save to SQL Server)" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-response-output-error-handling.png" alt="SSIS Web API Destination - Configure Response output and Error output (POST data to API, Parse JSON response into rows and columns and save to SQL Server)" width="800" /></p>
<h3>Method-2 : HTTP POST using SSIS REST API Task (In Control Flow)</h3>
<p>REST API Task support many advanced options too incase you want to tweak certain aspects of your POST request.</p>
<p>Here is the screenshot of HTTP POST in JSON format using <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZappySys REST API Task</a></p>
<div id="attachment_1020" style="width: 784px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/11/ssis-http-post-data-to-api-url-restful-json-web-request.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-1020" class="size-full wp-image-1020" src="//zappysys.com/blog/wp-content/uploads/2015/11/ssis-http-post-data-to-api-url-restful-json-web-request.png" alt="Perform HTTP POST operation using SSIS REST API Task - Send data in JSON content type" width="774" height="580" srcset="https://zappysys.com/blog/wp-content/uploads/2015/11/ssis-http-post-data-to-api-url-restful-json-web-request.png 774w, https://zappysys.com/blog/wp-content/uploads/2015/11/ssis-http-post-data-to-api-url-restful-json-web-request-300x225.png 300w" sizes="(max-width: 774px) 100vw, 774px" /></a><p id="caption-attachment-1020" class="wp-caption-text">Perform HTTP POST operation using SSIS REST API Task &#8211; Send data in JSON content type</p></div>
<h2>Parse response into rows/columns using SSIS JSON Source</h2>
<p>If you wish to POST data and parse JSON response into rows/columns then you can use <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a> for this purpose. JSON Source has great JSON Parser which supports parsing very large JSON  (stored in File or API URL or Direct string) into Rows and Columns. This is useful if you wish to save response into target such as SQL Server or CSV file.</p>
<div id="attachment_1022" style="width: 733px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/11/ssis-post-data-to-url-parse-json-response-using-json-source.png"><img decoding="async" aria-describedby="caption-attachment-1022" class="size-full wp-image-1022" src="//zappysys.com/blog/wp-content/uploads/2015/11/ssis-post-data-to-url-parse-json-response-using-json-source.png" alt="Post JSON data to HTTP URL and parse response into columns and rows" width="723" height="679" srcset="https://zappysys.com/blog/wp-content/uploads/2015/11/ssis-post-data-to-url-parse-json-response-using-json-source.png 723w, https://zappysys.com/blog/wp-content/uploads/2015/11/ssis-post-data-to-url-parse-json-response-using-json-source-300x282.png 300w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-1022" class="wp-caption-text">Post JSON data to HTTP URL and parse response into columns and rows</p></div>
<h2>Parse response into rows/columns using SSIS XML Source</h2>
<p>If you wish to POST data and parse XML response into rows/columns then you can use <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a> for this purpose. XML Source supports parsing XML data (stored in File or API URL or Direct string) into Rows and Columns. This is useful if you wish to save response into target such as SQL Server or CSV file.</p>
<h2>Passing credentials for Web Request for HTTP POST</h2>
<p>Unfortunately there is no one standard for passing credentials to server but good thing is <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZappySys REST API Task</a> comes with many options to secure your request and pass credentials (Userid/Password or API Key or OAuth Token).</p>
<h3>Basic Authentication</h3>
<p>Most common approach of passing credentials is userid/password. <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/#Passing_Credentials_along_with_HTTP_Web_Request">Check this article how to use Url from connection</a> if you wish to pass credentials using Basic authentication (i.e. Userid/password).</p>
<h3>OAuth Authentication (1.0 or 2.0)</h3>
<p>If your API support OAuth protocol then check these articles <a href="https://zappysys.com/blog/tag/oauth/" target="_blank" rel="noopener">how to use OAuth</a> with ZappySys REST connectors</p>
<h2>Passing Parameters in POST Body (Make it dynamic)</h2>
<p>SSIS PowerPack support variable placeholders for many editable text fields (usually indicated by variable icon or pencil icon).</p>
<p>If you wish to pass parameters in your data used in Body then use variable placeholder (e.g. {{User::varMyDate}}. When you edit POST Body you will see &lt;&lt;Insert Variable&gt;&gt; option.</p>
<p>Here is <a href="//zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm" target="_blank" rel="noopener">the complete list of available placeholder functions</a></p>
<h2>Upload file using Multi-Part POST</h2>
<p>If you have need to submit data to server from file then <a href="https://zappysys.com/blog/rest-api-file-upload-using-ssis-multi-part-post/" target="_blank" rel="noopener">check this link</a> (its shows few ways to upload file using HTTP POST)</p>
<h2>Most common Content-Type for POST operation</h2>
<p>There are many data formats which you can submit to server using HTTP POST but below is the most common data formats you will ever use for most of scenarios.</p>
<p>Data format is usually determined by server based on Content-Type header you include along with your request.</p>
<h3>HTTP POST Form data &#8211; submit key/value pairs (application/x-www-form-urlencoded)</h3>
<p>This is the most common data format for HTTP POST. Its also famous because any type you submit form on any website, most likely it will use below method for submitting your data to server. As you see its key/value pairs separated by ampersand [&amp;]. Also if some special character found then it needs to be URL encoded (e.g. @ is replaced by %40)</p><pre class="crayon-plain-tag">POST https://myserver.com/submit
Content-Type: application/x-www-form-urlencoded

firstname=bob&amp;amp;lastname=smith&amp;amp;email=bob%40mycompany.com</pre><p>
<h3>HTTP POST JSON data (application/json content-type)</h3>
<p>JSON is becoming very popular data format so if you are dealing with newer API then most likely you will have to submit your POST request using this content type like below. Assume that you creating new customer record then your request may look like below.</p><pre class="crayon-plain-tag">POST https://myserver.com/api/customer
Content-Type: application/json

{
 &quot;firstname&quot; : &quot;bob&quot;,
 &quot;lastname&quot; : &quot;smith&quot;,
 &quot;email&quot; : &quot;bob@mycompany.com&quot;
}</pre><p>
<h3>HTTP POST CSV data (text/plain content-type)</h3>
<p>When API POST required data in CSV format then you have to specify this content type. Below is the example of HTTP POST with CSV data.</p><pre class="crayon-plain-tag">POST https://myserver.com/api/customer
Content-Type: text/plain

firstname,lastname,email
bob,smith,bob@mycompany.com</pre><p>
<h3>HTTP POST XML data (application/xml content-type)</h3>
<p>When API POST required data in XML format then you have to specify (application/xml) content type. Below is the example of HTTP POST with XML data.</p><pre class="crayon-plain-tag">POST https://myserver.com/api/customer
Content-Type: application/xml

&lt;?xml version="1.0"?&gt;
&lt;data&gt;
 &lt;firstname&gt;bob&lt;/firstname&gt;
 &lt;lastname&gt;smith&lt;/lastname&gt;
 &lt;email&gt;bob@mycompany.com&lt;/email&gt;
&lt;/data&gt;</pre><p>
<h3>HTTP POST Binary data (Upload file)</h3>
<p>If you are POSTing large amount of data from file (i.e. uploading file) to your API endpoint then <a href="https://zappysys.com/blog/rest-api-file-upload-using-ssis-multi-part-post/" target="_blank" rel="noopener">check this article about How to Upload file using Multi-Part Upload</a></p>
<h3>HTTP POST Raw data (no content type)</h3>
<p>Do not pass any content-type header to send raw request</p>
<h2>Advanced Read / Write Scenarios / API Error Handling</h2>
<p>Now let&#8217;s look at some advanced scenario where ýou first have to call one API (GET or POST) using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">XML Source</a> and then POST data to some other URL using <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a>.</p>
<p>Once you get response after POST/GET parse those records for further processing along with error handling. Such API calls can be achieved using following pattern.</p>
<a href="https://zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FiNhHZH5WLNk%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<h2>Using Template Transform to build JSON or XML for POST Body</h2>
<p><a href="https://zappysys.com/blog/load-sql-server-data-workday-using-ssis-soap-api/" target="_blank" rel="noopener">Check this article</a> to learn more about some techniques to build JSON or XML for API POST Call (e.g. SOAP )</p>
<h2>Encoding for POST Body</h2>
<p>When using application/x-www-form-urlencoded content type (POST Form data) your server may require you to encode certain characters in property name or value using URL Encoding technique. As you see below key/value pairs separated by ampersand [&amp;]. Also if some special character found then it needs to be URL encoded (e.g. @ is replaced by %40). There are many online tools found to encode or decode data using <a href="http://www.bing.com/search?q=URL+encoding&amp;src=IE-TopResult&amp;FORM=IE11TR&amp;conversationid=" target="_blank" rel="noopener">URL encoding</a> technique.</p><pre class="crayon-plain-tag">firstname=bob&amp;lastname=smith&amp;email=bob%40mycompany.com</pre><p>
</p><pre class="crayon-plain-tag"></pre><p>
<h2>Troubleshooting / Debugging HTTP POST issues using Fiddler</h2>
<p>If you wish to see what&#8217;s being passed to server via any client tool or when you perform POST request ? Use tool called fiddler. Check this article to learn <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">how to use Fiddler</a> for debugging purpose.</p>
<h2>Conclusion</h2>
<p>As we enter into cloud first world you will face more and more need to integrate various RESTful API into your ETL workflows. <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> comes with complete toolset to automate any API calls (Read, Write or Parse). <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">Try it for free here</a> to discover many hidden features not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/">HTTP POST in SSIS &#8211; Send data to Web API url</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Working with HTTP Cookies in SSIS or ODBC</title>
		<link>https://zappysys.com/blog/ssis-rest-api-task-pass-cookies-to-web-request/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 21 Oct 2015 22:08:55 +0000</pubDate>
				<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[http web request]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=66</guid>

					<description><![CDATA[<p>Introduction In this post, you will learn how to Parse Cookies from a Response and Pass Cookies to any Web Requests. SSIS PowerPack v1.8.2 introduced a new feature that allows sending and receiving cookies with HTTP Web Request/Response. We will use the SSIS REST API Task to parse cookie values and then send cookies along with [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-rest-api-task-pass-cookies-to-web-request/">Working with HTTP Cookies in SSIS or ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this post, you will learn how to Parse Cookies from a Response and Pass Cookies to any Web Requests. <a target="_blank" rel="noopener">SSIS PowerPack v1.8.2</a> introduced a new feature that allows sending and receiving cookies with HTTP Web Request/Response.</p>
<p>We will use the <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS REST API Task</a> to parse cookie values and then send <strong>cookies </strong>along with an HTTP Web Request. <em>Cookies </em>are beneficial for maintaining session state across multiple web requests.</p>
<h2>Understanding Cookies</h2>
<p>Let&#8217;s look at an example of <a href="https://en.wikipedia.org/wiki/HTTP_cookie" target="_blank" rel="noopener">how Cookie works</a>. A cookie is a way of communication. Which means you can pass values to the Server or the Server can pass values to you.</p>
<h3><strong>Getting Cookies from Server (Web Response)</strong></h3>
<p>Many web APIs or sites send you cookies. If you are using a Browser, then it automatically saves for later use. The most common example is login pages. When you authenticate, the server sends cookies back via the Set-Cookie header. The server may send one or more Set-Cookie headers.  When you use the <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS REST API Task</a>, you can map such a value on the Response Tab. <span style="box-sizing: border-box; margin: 0px; padding: 0px;">However, one crucial difference is that the REST API Task will <span style="box-sizing: border-box; margin: 0px; padding: 0px;">send only one <strong>Set-Cookie</strong> header, combining all cookies </span>in Key1=Value1; Key2=Value2 &#8230; so on.</span> You can use Cookie Tab to Parse each Cookie and save to a separate variable (Explained in the next section)</p>
<p><strong>Web Request:</strong></p><pre class="crayon-plain-tag">POST http://mysite.com/login
Content-Type: application/x-www-form-urlencoded

userid=SOME_USER_NAME&amp;password=SOME_PASSWORD</pre><p>
<strong>Web Response:</strong></p>
<div class="mw-highlight mw-content-ltr" dir="ltr">
<pre class="crayon-plain-tag">Set-Cookie: SitePreference=MobileVersion
Set-Cookie: SessionId=12345
Set-Cookie: LoginToken=AAA111222; Expires=Wed, 09 Jun 2021 10:18:14 GMT
...
...</pre>
</div>
<h3><strong>Passing Cookies to Server (Web Request)</strong></h3>
<p>The user can pass one or multiple values in the form of Cookies to the server. To pass Cookie (s) to the Server, you have to send the  <strong>Cookie</strong> header as follows</p>
<p><strong>Web Request:</strong></p>
<div class="mw-highlight mw-content-ltr" dir="ltr">
<pre class="crayon-plain-tag">GET http://mysite.com/securepage.html
Cookie: LoginToken=AAA1112222; SessionId=1234
...
...</pre>
&nbsp;</p>
</div>
<h2>Reading Cookies from Web Response using SSIS</h2>
<p><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><a target="_blank" rel="noopener">SSIS REST API Task</a> supports reading cookies in three different ways.</span></p>
<h3>Method-1 (for SSIS / ODBC): Dynamic Token with Retain Cookie Setting (Using Cookie from Login)</h3>
<p>In the new version of the HTTP Connection UI, you can find Retain Cookie settings as shown below.</p>
<div id="attachment_11562" style="width: 814px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-configuration.png"><img decoding="async" aria-describedby="caption-attachment-11562" class="size-full wp-image-11562" src="https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-configuration.png" alt="" width="804" height="704" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-configuration.png 804w, https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-configuration-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-configuration-768x672.png 768w" sizes="(max-width: 804px) 100vw, 804px" /></a><p id="caption-attachment-11562" class="wp-caption-text">Dynamic token configuration</p></div>
<div id="attachment_11564" style="width: 626px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-sending-request.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11564" class="size-full wp-image-11564" src="https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-sending-request.png" alt="" width="616" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-sending-request.png 616w, https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-sending-request-300x289.png 300w" sizes="(max-width: 616px) 100vw, 616px" /></a><p id="caption-attachment-11564" class="wp-caption-text">Dynamic token &#8211; sending the request</p></div>
<p>If you are not receiving a Token from the response and only want to use Cookies, then set the following way (Enter Fake Regular expression (i.e., word like &#8220;SOME-FAKE&#8221; is fine )</p>
<div id="attachment_11563" style="width: 630px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-save-response.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11563" class="size-full wp-image-11563" src="https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-save-response.png" alt="" width="620" height="530" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-save-response.png 620w, https://zappysys.com/blog/wp-content/uploads/2015/10/Dynamic-token-save-response-300x256.png 300w" sizes="(max-width: 620px) 100vw, 620px" /></a><p id="caption-attachment-11563" class="wp-caption-text">Dynamic token &#8211; save the response</p></div>
<h3>Method-2 (for SSIS): Reading / Parsing Multiple Cookies (Save to SSIS variables)</h3>
<p>If you like to save cookie value(s) into separate SSIS variable(s), then you can use <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS REST API Task</a> &gt;&gt; Cookie Tab to configure Mappings. Perform the following steps.</p>
<ol>
<li>Configure REST API Task with necessary information (e.g., URL, Headers, Body)</li>
<li>Go to the Cookie Tab. In the Mapping Grid, enter each Cookie Name and map it to an SSIS Variable, as shown below. When you run the SSIS Package, you will see values stored in the variable.</li>
</ol>
<div id="attachment_11568" style="width: 919px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11568" class="size-full wp-image-11568" src="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-tab.png" alt="" width="909" height="607" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-tab.png 909w, https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-tab-300x200.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-tab-768x513.png 768w, https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-tab-272x182.png 272w" sizes="(max-width: 909px) 100vw, 909px" /></a><p id="caption-attachment-11568" class="wp-caption-text">REST API task &#8211; Cookies tab</p></div>
<h3>Method-3 (for SSIS): Read as raw cookie string</h3>
<p>Sometimes you may need to see all cookies in key/value pairs and save them to a variable. If that&#8217;s the case, then use the Response setting tab and map the <strong>Set-Cookie</strong> Response Header to some SSIS Variable.</p>
<div id="attachment_11569" style="width: 792px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Raw-cookie.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11569" class="size-full wp-image-11569" src="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Raw-cookie.png" alt="" width="782" height="661" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Raw-cookie.png 782w, https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Raw-cookie-300x254.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Raw-cookie-768x649.png 768w" sizes="(max-width: 782px) 100vw, 782px" /></a><p id="caption-attachment-11569" class="wp-caption-text">REST API task &#8211; Raw Cookie</p></div>
<div id="attachment_11565" style="width: 653px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/Final-Result-cookies.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11565" class="size-full wp-image-11565" src="https://zappysys.com/blog/wp-content/uploads/2015/10/Final-Result-cookies.png" alt="" width="643" height="234" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/Final-Result-cookies.png 643w, https://zappysys.com/blog/wp-content/uploads/2015/10/Final-Result-cookies-300x109.png 300w" sizes="(max-width: 643px) 100vw, 643px" /></a><p id="caption-attachment-11565" class="wp-caption-text">Final Result &#8211; cookies</p></div>
<h3>Method-4 (for SSIS): Read Cookies  as CookieContainer</h3>
<p>Now, let&#8217;s look at how to use the CookieContainer Variable to save the Session across multiple API calls. All you have to do is create an Object datatype variable and select the same variable across various tasks.</p>
<p>In the example below, the first task is &#8220;Set Cookies&#8221;.It&#8217;s similar to a Login call in a traditional API call, where you get cookies back from the server. Call web url &#8220;http://httpbin.org/cookies/set?k2=val2&amp;k1=myval1&#8221;, this generates some cookies and places them into a variable called &#8220;varCookies&#8221; (Must be Object datatype)</p>
<p>In the next step, we call the URL &#8220;http://httpbin.org/cookies&#8221; and pass the previously captured cookies from &#8220;varCookies&#8221; (Set on the Cookies tab). And the 3rd step displays the response from the URL (this demo URL returns all supplied cookies in JSON format).</p>
<div id="attachment_11566" style="width: 798px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-cookie-container.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11566" class="size-full wp-image-11566" src="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-cookie-container.png" alt="" width="788" height="617" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-cookie-container.png 788w, https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-cookie-container-300x235.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-cookie-container-768x601.png 768w" sizes="(max-width: 788px) 100vw, 788px" /></a><p id="caption-attachment-11566" class="wp-caption-text">SSIS REST API Task &#8211; Send Cookies with HTTP Web Request, Store Cookies in Variable</p></div>
<h2>Pass Cookies to Web API (for SSIS / ODBC)</h2>
<p>Now, let&#8217;s look at how to Pass Cookie (s) along with your Web Request</p>
<p>To pass a cookie, you have to use the Cookie HTTP Header. You can pass multiple cookies in a single header as below</p><pre class="crayon-plain-tag">Cookie : Key1=value1; Key2=Value2</pre><p>
You can use an SSIS variable to pass a dynamic value, as shown in the screenshot below. (e.g. MyCookieName={{User::MyVariable}} )</p>
<div id="attachment_11567" style="width: 797px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-inside-the-header.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11567" class="size-full wp-image-11567" src="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-inside-the-header.png" alt="" width="787" height="671" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-inside-the-header.png 787w, https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-inside-the-header-300x256.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/10/REST-API-task-Cookies-inside-the-header-768x655.png 768w" sizes="(max-width: 787px) 100vw, 787px" /></a><p id="caption-attachment-11567" class="wp-caption-text">REST API task &#8211; Cookies inside the header</p></div>
<p>The post <a href="https://zappysys.com/blog/ssis-rest-api-task-pass-cookies-to-web-request/">Working with HTTP Cookies in SSIS or ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
