<?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: HTTP Request wtih Headers on JMP 15 in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/HTTP-Request-wtih-Headers-on-JMP-15/m-p/238387#M47093</link>
    <description>&lt;P&gt;Try the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;request_headers = Associative Array();
request_headers["username"] = "XXX213098457";
request_headers["token"] = "098ASHDK23UE2D903YG";

myRequest = HTTP Request( Url( myAPIURL ), Method( "GET" ), Headers( request_headers ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Dec 2019 16:08:51 GMT</pubDate>
    <dc:creator>Ryan_Gilmore</dc:creator>
    <dc:date>2019-12-12T16:08:51Z</dc:date>
    <item>
      <title>HTTP Request wtih Headers on JMP 15</title>
      <link>https://community.jmp.com/t5/Discussions/HTTP-Request-wtih-Headers-on-JMP-15/m-p/238371#M47091</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to make an HTTP request to an API but I need to pass on two headers, a username and a token, however after several different tries I'm not able to pass more than one header. If I pass only the username, it reaches the API, however when I pass both it doesn't parse them correctly (I'm able to connect from diffent sources, such as through a Python script).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the attempt I believe makes the most sense:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myAPIURL = "https://my.api.url/";

myRequest = New HTTP Request(
	URL(myAPIURL),
	Method("GET"),
	Headers("username: XXX213098457, token: 098ASHDK23UE2D903YG");
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I do the call only with the username, I'm able to reach and have it parsed on the API, however when I add the token, it doesn't even parse the username. Could that be a bug, or is there any other documentation on how to use headers? I've searched the community but didn't see much, specially on JMP 15.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g., this works:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myAPIURL = "https://my.api.url/";

myRequest = New HTTP Request(
	URL(myAPIURL),
	Method("GET"),
	Headers("username: XXX213098457");
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Dec 2019 15:12:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/HTTP-Request-wtih-Headers-on-JMP-15/m-p/238371#M47091</guid>
      <dc:creator>luizpdlh</dc:creator>
      <dc:date>2019-12-12T15:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Request wtih Headers on JMP 15</title>
      <link>https://community.jmp.com/t5/Discussions/HTTP-Request-wtih-Headers-on-JMP-15/m-p/238387#M47093</link>
      <description>&lt;P&gt;Try the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;request_headers = Associative Array();
request_headers["username"] = "XXX213098457";
request_headers["token"] = "098ASHDK23UE2D903YG";

myRequest = HTTP Request( Url( myAPIURL ), Method( "GET" ), Headers( request_headers ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Dec 2019 16:08:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/HTTP-Request-wtih-Headers-on-JMP-15/m-p/238387#M47093</guid>
      <dc:creator>Ryan_Gilmore</dc:creator>
      <dc:date>2019-12-12T16:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Request wtih Headers on JMP 15</title>
      <link>https://community.jmp.com/t5/Discussions/HTTP-Request-wtih-Headers-on-JMP-15/m-p/598291#M80197</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 05:06:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/HTTP-Request-wtih-Headers-on-JMP-15/m-p/598291#M80197</guid>
      <dc:creator>UersK</dc:creator>
      <dc:date>2023-02-08T05:06:37Z</dc:date>
    </item>
  </channel>
</rss>

