Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-12-2019 11:52 AM
Hello!
I'm trying to use apoc.load.jsonParams with headers parameters.
I've a problem with this statement :
WITH 'https://myurl' AS uri
CALL apoc.load.jsonParams(uri, {access-username: 'xxxxxxxxxx', access-password: 'yyyyyyyy'}, null)
YIELD value
RETURN value
I get this error :
Neo.ClientError.Statement.SyntaxError: Invalid input '-': expected an identifier character, whitespace, '}' or ':' (line 2, column 34 (offset: 128))
"CALL apoc.load.jsonParams(uri, {access-username: 'xxxxxxxxxx', access-password: 'yyyyyyyyy'}, null)"
There is a solution to use key containing "-" ?
The API I try to call is not modifiable..
By advance, thanks you!
Solved! Go to Solution.
05-13-2019 06:22 AM
Map keys containing "special" characters (e.g. -, space, umlauts...) need to be quoted into backticks:
return {`access-username`: "abc"}
05-13-2019 06:22 AM
Map keys containing "special" characters (e.g. -, space, umlauts...) need to be quoted into backticks:
return {`access-username`: "abc"}
05-15-2019 11:03 AM
Thanks you! It works
All the sessions of the conference are now available online