<?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, 19 Jun 2026 12:32:12 +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 a REST API or a SOAP Web Service in SSIS. In this article, we will focus only on how to perform an HTTP POST in SSIS using a RESTful approach. HTTP Protocol supports many methods, also referred to as verbs (e.g. GET, PUT, POST, HEAD, DELETE). [&#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 target="_blank" rel="noopener">how to call a REST API or a SOAP Web Service in SSIS</a>. In this article, we will focus only on how to perform an <strong>HTTP POST in SSIS</strong> using a RESTful approach.</p>
<p>HTTP Protocol supports many methods, also referred to as verbs (e.g. GET, PUT, POST, HEAD, DELETE). Based on this verb, the target server (API server) can perform the desired action. For example, GET is usually used for read-only data fetch (similar to a select query in SQL). POST is usually used to create a 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, when SSIS developers wanted to perform an HTTP POST operation, they had to write <strong>C# Code using a Script Task</strong>. This is no longer the case after ZappySys developed easy-to-use drag-and-drop REST API Tasks and Connectors. As of now, 4 main connectors/tasks support 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 two methods to POST data from your database to the 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, generate POST data, and then submit to an API endpoint using the <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 the following screenshot to get an idea of 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 />
<a href="https://zappysys.com/blog/wp-content/uploads/2015/11/Data-flow-result.png"><img decoding="async" class="alignnone size-full wp-image-12275" src="https://zappysys.com/blog/wp-content/uploads/2015/11/Data-flow-result.png" alt="" width="429" height="282" srcset="https://zappysys.com/blog/wp-content/uploads/2015/11/Data-flow-result.png 429w, https://zappysys.com/blog/wp-content/uploads/2015/11/Data-flow-result-300x197.png 300w" sizes="(max-width: 429px) 100vw, 429px" /></a></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 execution, use error output (drag the red arrow from the Web API destination and attach it to the downstream). Make sure you set Redirect for Error and Truncate both when prompted on attach)</p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2015/11/Result.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-12278" src="https://zappysys.com/blog/wp-content/uploads/2015/11/Result.png" alt="" width="1162" height="564" srcset="https://zappysys.com/blog/wp-content/uploads/2015/11/Result.png 1162w, https://zappysys.com/blog/wp-content/uploads/2015/11/Result-300x146.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/11/Result-1024x497.png 1024w, https://zappysys.com/blog/wp-content/uploads/2015/11/Result-768x373.png 768w" sizes="(max-width: 1162px) 100vw, 1162px" /></a></p>
<h3>Method-2: HTTP POST using SSIS REST API Task (In Control Flow)</h3>
<p>REST API Task supports many advanced options, too, in case you want to tweak certain aspects of your POST request.</p>
<p>Here is the screenshot of HTTP POST in JSON format using the <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_12277" style="width: 848px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2015/11/REST-API-task-httpbin-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-12277" class="size-full wp-image-12277" src="https://zappysys.com/blog/wp-content/uploads/2015/11/REST-API-task-httpbin-example.png" alt="" width="838" height="640" srcset="https://zappysys.com/blog/wp-content/uploads/2015/11/REST-API-task-httpbin-example.png 838w, https://zappysys.com/blog/wp-content/uploads/2015/11/REST-API-task-httpbin-example-300x229.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/11/REST-API-task-httpbin-example-768x587.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-12277" class="wp-caption-text">Perform an HTTP POST operation using the 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 the <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 a great JSON Parser that supports parsing very large JSON (stored in a file, an API URL, or a Direct string) into Rows and Columns. This is useful if you wish to save the response into a target such as SQL Server or a CSV file.</p>
<div id="attachment_12276" style="width: 838px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2015/11/JSON-source-httpbin-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-12276" class="size-full wp-image-12276" src="https://zappysys.com/blog/wp-content/uploads/2015/11/JSON-source-httpbin-example.png" alt="" width="828" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2015/11/JSON-source-httpbin-example.png 828w, https://zappysys.com/blog/wp-content/uploads/2015/11/JSON-source-httpbin-example-300x270.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/11/JSON-source-httpbin-example-768x691.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-12276" class="wp-caption-text">Post JSON data to an HTTP URL and parse the 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 the <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 (from a file, an API URL, or a string) into Rows and Columns. This is useful if you wish to save the response into a target such as SQL Server or a CSV file.</p>
<h2>Passing credentials for Web Request for HTTP POST</h2>
<p><span style="box-sizing: border-box; margin: 0px; padding: 0px;">Unfortunately, there is no one standard for passing credentials to the server. Still, the good thing is that <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).</span></p>
<h3>Basic Authentication</h3>
<p>The most common approach to passing credentials is user ID/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" target="_blank" rel="noopener">Check this article on how to use a URL from a 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 supports the OAuth protocol, then check these articles on <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 supports variable placeholders for many editable text fields (usually indicated by a variable icon or a pencil icon).</p>
<p>If you wish to pass parameters in the data used in the Body, then use a 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 need to submit data to a server from a 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> (it shows a few ways to upload a file using HTTP POST)</p>
<h2>Most common Content-Type for POST operation</h2>
<p>There are many data formats you can submit to the server via HTTP POST, but below are the most common ones you will use in most scenarios.</p>
<p>The data format is usually determined by the server based on the Content-Type header you include 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. It&#8217;s also famous because whenever you submit a form on any website, it most likely uses this method to send your data to the server. As you see, it&#8217;s key/value pairs separated by ampersand [&amp;]. Also, if a special character is 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 a very popular data format, so if you are dealing with a newer API, you will most likely need to submit your POST request using this content type, as shown below. Assume you are creating a new customer record; your request may look like the following.</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 a POST request to an API requires CSV data, you have to specify the content type. Below is an 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 an API POST requires data in XML format, you have to specify (application/xml) content type. Below is an 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 a large amount of data from a file (i.e. uploading a 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 a 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 a raw request</p>
<h2>Advanced Read / Write Scenarios / API Error Handling</h2>
<p>Now let&#8217;s look at <span style="box-sizing: border-box; margin: 0px; padding: 0px;">an advanced scenario where you first </span><span style="box-sizing: border-box; margin: 0px; padding: 0px;">call one API (GET or POST) using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">a JSON or</a><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener"> XML Source,</a> and then POST data to another URL using <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">a </a></span><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 receive a response after a POST/GET, parse the records for further processing and error handling. Such API calls can be achieved using the 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 the 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 an 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 are separated by ampersand [&amp;]. Also, if a special character is found, it needs to be URL-encoded (e.g., @ is replaced by %40). There are many online tools available 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>.</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 the server via any client tool, or when you perform a POST request? Use a 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 purposes.</p>
<h2>Conclusion</h2>
<p>As we enter the cloud-first world, you will increasingly need to integrate various RESTful APIs into your ETL workflows.<a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> comes with a 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 loading="lazy" 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>
