<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting headers sent to my app? in G Web Development Software</title>
    <link>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4199112#M170</link>
    <description>&lt;P&gt;Ah yea, it was named pretty directly after the underlying JavaScript property that is being accessed, ie the &lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/Window/location" target="_self"&gt;location property of the window object&lt;/A&gt;. I can see how the name could be misconstrued for the window geometry&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_savoring_food:"&gt;😋&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Dec 2021 21:22:08 GMT</pubDate>
    <dc:creator>MilanR</dc:creator>
    <dc:date>2021-12-16T21:22:08Z</dc:date>
    <item>
      <title>Getting headers sent to my app?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4197842#M165</link>
      <description>&lt;P&gt;I think I'm missing something obvious.&lt;/P&gt;
&lt;P&gt;Is there a way to get the headers of the request that invokes my app's web pages?&lt;/P&gt;
&lt;P&gt;Perhaps there's some way to open a client handle to "this request"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In particular, I'd like to know what the "Host:" header is, so I can know what host I'm running on.&lt;/P&gt;
&lt;P&gt;Is there another way to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:35:17 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4197842#M165</guid>
      <dc:creator>bhpowell</dc:creator>
      <dc:date>2021-12-11T15:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Getting headers sent to my app?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4198909#M167</link>
      <description>&lt;P&gt;Are you referring to the following scenario:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You are making HTTP requests in a WebVI using relative URLs so you are not aware of the host, ie GET /mydata&lt;/LI&gt;
&lt;LI&gt;You want to get the HOST of the HTTP Requests that your WebVI is making to other servers&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;In that scenario the HOST that is used in the HTTP request is the same as what is shown in the URL for the current page. You can use the&amp;nbsp;&lt;A href="https://forums.ni.com/t5/Example-Code/URL-for-WebVI/ta-p/4157062" target="_self"&gt;URL for WebVI&lt;/A&gt; library to get the parts of the URL for the page. The &lt;A href="https://rajsite.github.io/webvi-experiments/URL/playground/index.html" target="_self"&gt;demo&lt;/A&gt; shows how the library can get the current URL of a page and parse and return the host portion of the URL.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 05:00:41 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4198909#M167</guid>
      <dc:creator>MilanR</dc:creator>
      <dc:date>2021-12-16T05:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting headers sent to my app?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4199105#M168</link>
      <description>&lt;P&gt;Hi, Milan. Thanks for the response.&lt;/P&gt;
&lt;P&gt;The VIs you linked to are indeed useful, but I'm not sure they solve my problem.&lt;/P&gt;
&lt;P&gt;To answer your question, suppose I build an app called "MyWebApp" and install it in htdocs of the NI Web Server.&lt;/P&gt;
&lt;P&gt;If I'm invoked as &lt;A href="http://myserver.stravaro.com/MyWebApp," target="_blank"&gt;http://myserver.stravaro.com/MyWebApp,&lt;/A&gt;&amp;nbsp;I'd like to have MyWebApp's code be able to know that it is running on "&lt;A href="http://myserver.stravaro.com" target="_blank"&gt;http://myserver.stravaro.com&lt;/A&gt;".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This information is part of the headers with which my web app is called, but I'm not sure how to retrieve those headers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 20:17:17 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4199105#M168</guid>
      <dc:creator>bhpowell</dc:creator>
      <dc:date>2021-12-16T20:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Getting headers sent to my app?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4199107#M169</link>
      <description>&lt;P&gt;I spoke too soon.&amp;nbsp; You have a VI named "Window Location Get.gvi" which does what I want.&amp;nbsp; (Especially if I use it with "URL Get Parts.gvi".)&lt;/P&gt;
&lt;P&gt;I really didn't expect the function to be named "Window Location Get.gvi".&amp;nbsp; This seems like it should be referring to the window geometry in the GUI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 20:41:43 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4199107#M169</guid>
      <dc:creator>bhpowell</dc:creator>
      <dc:date>2021-12-16T20:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Getting headers sent to my app?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4199112#M170</link>
      <description>&lt;P&gt;Ah yea, it was named pretty directly after the underlying JavaScript property that is being accessed, ie the &lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/Window/location" target="_self"&gt;location property of the window object&lt;/A&gt;. I can see how the name could be misconstrued for the window geometry&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_savoring_food:"&gt;😋&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 21:22:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Getting-headers-sent-to-my-app/m-p/4199112#M170</guid>
      <dc:creator>MilanR</dc:creator>
      <dc:date>2021-12-16T21:22:08Z</dc:date>
    </item>
  </channel>
</rss>

