David Rubio Posted December 16, 2024 Posted December 16, 2024 Hello, We want to use ASYRRESTCLI.EXEC_REST_WS to connect to an API but we are having problems with the header In an example from the help that we have used on multiple occasions it would be like this: HCOD(1)="Content-Type" HVAL(1)= '"application/json"' This API requires the header to be like this: 'Authorization: OAuth oauth_consumer_key="key",oauth_token="token"' So we set the variables as follows: HCOD(1)='Authorization' HVAL(1)= '”OAuth oauth_consumer_key="key",oauth_token="token"”’ This returns the following error: The problem is the quotes around HVAL. How can we put the quotes around “key” so that it doesn't give an error? We have tried many combinations but always with the same result. The only way to avoid an error is to put it like this: '"OAuth oauth_consumer_key=key,oauth_token=token"' But this way, it returns statuscode=500
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now