Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 646

When auto-submitting a form, how do I add a header?

$
0
0

I’m using JQuery 1.9.2, although this question might not concern JQuery. I’m auto-submitting an HTML form using this code …

<script type="text/javascript">    $(function() {        $('#autolaunch').submit();     }); </script>…<form id="autolaunch" name="autolaunch" action="${ltiLaunchUrl}" method="post"><input type="hidden" name="lti_version" value="${lti_version}" /><input type="hidden" name="lti_message_type" value="${lti_message_type}" />…<input type="hidden" name="lis_person_name_given" value="${lis_person_name_given}" /></form>

The action of the form is a different domain than the server on which this page is accessed. My question is, how can I add a header when submitting this data? The header I want to add would look like name = "LTI-Authorization" and value = “Token consumerKey:consumerSecret”.


Viewing all articles
Browse latest Browse all 646

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>