Hey guys
I have a problem when trying to connect to a api get get the results from the REST.
I need the header "Authorization: FlespiToken XXXXXXXXXX"
i found serval suggestion but none work.
Curl command works:
"curl -X GET --header 'Authorization: FlespiToken XYZX' 'https://zdfvsdgsdfg/fhdfg'
I also tried this:
but i get error 1111: request headers are not valid: element 2 does not contain two elements
-
Put the Web1.RequestHeaders above the Web1.Url block
-
Headers need to be requested as a list of lists - the sublists being lists of pairs.
Make a list : Make a list: Authorisation Make a list: abc 123
but remove all the : (colons) and don't forget to add a space between the text FlespiToken and the token, the header must be a list of lists!
Make a list : Make a list: Authorization
FlespiToken XYZX
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
I had spaces
thanks Timai and Taifun, i tried both versions, with and without spaces and without :
Anwser is expired token or missing Header.
A debug would be nice.
i though maybe before i set the RequestsHeaders, i try to set is as text and show it in the app before but that did not work either
Are you sure you tried this:
(check spelling of Authorization, because I used an s instead of a z)
(I have put the space in as a block to make it obvious)
(note the two "make a lists")
Click on the mutator (the small blue square), then you will see you can remove the empty socket.
http://ai2.appinventor.mit.edu/reference/concepts/mutators.html