Created
July 14, 2016 15:49
-
-
Save bheyde/f4f6a1b39843ea0ace04e96eaf2cf4a1 to your computer and use it in GitHub Desktop.
mvt:call - passing custom headers example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvt:assign name="g.api_endpoint" value="'https://DJDHGSDJD-dsn.algolia.net'" /> | |
<mvt:assign name="g.index_name" value="'docs.miva'" /> | |
<mvt:assign name="g.path" value="'/1/indexes/' $ g.index_name $ '/390342730'" /> | |
<mvt:assign name="g.api_request" value="g.api_endpoint $ g.path" /> | |
<mvt:assign name="g.headers" value="'X-Algolia-API-Key: 17181817181912' $ asciichar( 13 ) $ asciichar( 10 )" /> | |
<mvt:assign name="g.headers" value=" g.headers $ 'X-Algolia-Application-Id: HSGDJDJDGD' $ asciichar( 13 ) $ asciichar( 10 )" /> | |
<mvt:call action="g.api_request" method="'PUT'" headers="'g.headers'"> | |
<mvt:eval expr="s.callvalue" /> | |
</mvt:call> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Brennan, I just noticed that
headers='g.headers'
doesn't currently work for me but insteadheaders=g.headers
does. Could this accidentally be a typo on the snippet provided? Thanks.