Nouvel Travay
Nouvel Travay

Reputation: 6472

appEngine cloud endpoint single parameter issue

Google Cloud Endpoint will not allow you to have more than one parameter in a call. So for example, the following won't work

@ApiMethod(name = "addFriend", httpMethod = ApiMethod.HttpMethod.POST)
    public void addFriend(Friend frient, User user) throws OAuthRequestException {
        ...
    }

The problem is OAuth requires that I have a User parameter in addition to my usual parameter. So how should I write it?

Upvotes: 1

Views: 165

Answers (1)

sandeepd
sandeepd

Reputation: 515

It shows as an error in Android Studio, but works when you deploy it with Maven! Guess Gradle plugin support in Studio for Cloud Endpoints framework v2 will solve this check. For the moment, use @SuppressWarnings("ResourceParameter").

Upvotes: 2

Related Questions