On Wed, Jan 22, 2014 at 9:29 AM, Ciro S. Costa <[email protected]> wrote:
> i've been developing an application and now i'm having a few troubles with
> endpoints.
> Everything is working fine with the API Explorer. Now i'd like to
> reproduce some steps with a simple *curl* so that anyone can interact
> with the API in the way he/she wants.
>
> Using the token provided by endpoints.API_EXPLORER_CLIENT_ID and getting
> from the header at API Explorer it's perfect to make a request:
>
> *curl --header "Content-Type: application/json" \*
> * --header "Authorization: Bearer ya2 ..." \*
> * -X POST -d '{"name": "value"}' \*
> * http://localhost:8080/_ah/api/myapi/v1/sample
> <http://localhost:8080/_ah/api/myapi/v1/sample>*
>
>
> I'd like to know if it is possible to authenticate a user from a simple
> *curl *request (i.e, receive the token), or maybe a javascript request
> without using the Google JavaScript client
> library<http://code.google.com/p/google-api-javascript-client/wiki/ReferenceDocs>
> .
>
Yes you can, since Endpoints is JSON and REST based.
There are several different ways to structure your requests in Endpoints:
if you're stuck on how to design your curl calls, you can try building a
client using the Javascript library and then examining the calls it makes
using your browser's developer console. From there you can translate to
curl syntax.
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL
App Engine Code Samples: http://www.learntogoogleit.com
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.