0

Is it possible to make HEAD requests?

The changelog for build 17991 (June 3 2011) says that y.rest.head() was added, but I can't seem to get it working, as there's no documentation anywhere.

If it actually does exist, how do I use it? If not, is there another way to make a HEAD request?

I'm trying to find the sizes of large binary files, so I can't GET the file (it's too big and causes a timeout).

by
2 Replies
  • Link to the changelog:&nbsp;<a href="http://www.yqlblog.net/blog/2011/06/03/changelog-for-build-17991/">http://www.yqlblog.net/blog/2011/06/03/changelog-for-build-17991/</a>
    0
  • <span style="color:#666666;line-height:normal;"><span class="js-variable" style="color:black;font-family:Arial;">In the most simple terms, you just need to call the </span><span class="js-variable" style="color:black;"><span style="font-family:'Courier New';">head()</span></span><span class="js-variable" style="color:black;font-family:Arial;"> method as you would with </span><span class="js-variable" style="color:black;"><span style="font-family:'Courier New';">get()</span></span><span class="js-variable" style="color:black;"><span style="font-family:Arial;">. A basic example within a data table&#39;s execute block would simply be:</span><br><br><span style="font-family:'Courier New';">response</span></span><span style="font-family:'Courier New';"><span class="js-punctuation" style="color:#666666;">.</span><span class="js-property" style="color:black;">object&nbsp;</span><span class="js-operator" style="color:#666666;">=&nbsp;</span><span class="js-variable" style="color:black;">y</span><span class="js-punctuation" style="color:#666666;">.</span><span class="js-property" style="color:black;">rest</span><span class="js-punctuation" style="color:#666666;">(</span><span class="js-string" style="color:#aa2222;">&quot;http://developer.yahoo.net&quot;</span><span class="js-punctuation" style="color:#666666;">)</span><span class="js-punctuation" style="color:#666666;">.</span><span class="js-property" style="color:black;">head</span><span class="js-punctuation" style="color:#666666;">(</span><span class="js-punctuation" style="color:#666666;">)</span><span class="js-punctuation" style="color:#666666;">;<br></span></span></span><br><br><span style="font-family:'Courier New';font-size:12px;"></span><br><br><div class="quote "><div class="quotetop ">QUOTE<cite>(Lachlan @ 27 Aug 2011 1:43 AM)</cite><blockquote class="quotemain">If it actually does exist, how do I use it? If not, is there another way to make a HEAD request?<br></blockquote></div></div>
    0

Recent Posts

in YQL