0

I am starting to write the Asana API using Embarcadero EX6 that is using the built in REST Client. I have my RESTClient, SimpleAuthenticator, RESTRequest and RESTResponse controls in place so there isn't any code to show since it’s all done within those controls. I am not getting a “Not Authorized” return error so I think the API key and authorization is setup correctly. However I am getting the following response back when I run a query for users. The RESTRequest is using POST.

{"errors":[{"message":"Empty field name"}]}

Any ideas?

Chad
  • 273
  • 3
  • 8
  • 19
  • I was able to get this working! I used the built in REST Debugger application within Embarcadero and copied to controls to the clipboard and pasted them into my application. I found out that the Params in the RESTRequest was causing the issue, there shouldn't be any and also changed the method to GET. – Chad Jul 16 '14 at 19:05

1 Answers1

0

POST is (generally) for creating, so you need to specify the fields of the resource you want to create. In this case to retrieve users you want to use a GET.

agnoster
  • 3,744
  • 2
  • 21
  • 29