I’m trying to assemble a header object for an api request. One of the headers is ‘Content-Type’. The hyphen is causing a compile error. Flex is giving me:
1050 – Cannot assign to a non-reference value.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t have a hyphen (minus sign) in your variable name. For example, if you try to have a variable a-b = 3, Flex thinks you’re talking about subtraction.
The documentation gives info about how to set headers: