How do I Add a header to the AJAX POST

Get help using Construct 2

Post » Wed Apr 19, 2017 11:09 pm

I'm using the AJAX object to post high scores to a C# based REST service, and the service in question requires an "X-Access-Token" header before it will accept the post. How can I add this header to the built in AJAX object?
B
14
S
6
G
1
Posts: 143
Reputation: 1,800

Post » Wed Apr 19, 2017 11:57 pm

As per the manual, there is a "Set request header" action that should accomplish what you need. Simply call this before any AJAX post that needs this particular header.
B
75
S
31
G
27
Posts: 1,000
Reputation: 20,735

Post » Thu Apr 20, 2017 2:18 pm

Thanx. I overlooked that when I was reading through it.
B
14
S
6
G
1
Posts: 143
Reputation: 1,800


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests