Note that there are some explanatory texts on larger screens.

plurals
  1. POI need to add meta headers to URLRequest in flex3
    primarykey
    data
    text
    <p>I am writing a flex3 tool for our uber-geeks. The tool is for futzing around with sharing URLs to various various social sites. </p> <pre><code>private function submitRequest(evt:Event):void { var requestURL:URLRequest = new URLRequest(constructURL()); requestURL.method=URLRequestMethod.POST; var header:URLRequestHeader = new URLRequestHeader("og:title", "petertitle"); requestURL.requestHeaders.push(header); navigateToURL(requestURL,"_blank"); } </code></pre> <p>I want allow the developer to manipulate the following meta headers in the outgoing html request when navigateToURL() is called.</p> <pre><code>&lt;meta property="og:title" content=title" /&gt; &lt;meta property="og:description" content="description" /&gt;\ &lt;meta property="og:image" content="......" /&gt; &lt;meta property="og:video" content="......"/&gt; &lt;meta property="og:video:height" content="640" /&gt; &lt;meta property="og:video:width" content="480" /&gt; </code></pre> <p>Unfortunately google is not showing me any example of how to add the above meta headers to my instance of URLRequest in flex. AND the new URLRequestHeader is blowing up.</p> <pre><code>ArgumentError: Error #2096: The HTTP request header og:title cannot be set via ActionScript. at global/flash.net::navigateToURL() </code></pre> <p>Can someone point me at an example of putting the meta headers into a URLRequest?</p> <hr> <hr> <p>additional</p> <p>Looks like I am in a catch 22 situation. I wrote the app to run in a flash player.</p> <ol> <li>apparently the flash apps run from flashbuilder are not permitted to perfom http PUT method operations. it alwasy does GET</li> <li>flash apps run from flashbuilder will not write headers on http GET calls.</li> </ol> <p>But I am still not finding a way to add an http "meta" header tag in flex... perhaps adobe air.</p> <p>Current work around.</p> <p>I can call an external javascript function that will do a post, but however the XmlHttpRequest infrastructure only want to setRequestHeader(key,value), and seems to need to be from a very specific list of strings. setRequestHeader("foo","bar") did not add a foo header in my outgoing request.</p> <p>There does not seem to be a way to add the header meta tag. via javascript. Or at lease I am not finding it off of google.</p> <p>Hoping someone can now point me at how to do that?????</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload