Hi,

I am attempting to write my first server, and I've found many things to 
facilitate that, but Mongoose is by far the most attractive :)

However, I am really struggling to find any information or examples out 
there beyond the 6 on here http://cesanta.com/docs/Embed.shtml (where the 
'upload.c' link is goes to 'post.c' BTW).

Does anyone have an example of how to call out to an external REST API?

I'm not interested in serving my own - I think I understand how to do that.
But I need to be able to call out to others...

I have created a connection to the API, but I don't seem to be able to do 
anything beyond that.
I've intercepted the connect event, but I can't modify anything within the 
connection structure...

I was trying this...

case MG_WS_CONNECT:
{
connection->uri = 
"/gapi/translate?from=eng&dest=fra&format=xml&phrase=cat&pretty=true";
connection->request_method = "GET";

result = MG_TRUE;
}
break;

...but connection->uri and request_method still show NULL after 
this because they are const char * I guess.

Am I supposed to create yet another connection at this point with the full 
API request URL?
But then how do I set the request type?

Or am I chasing ghosts...?
Is Mongoose only good for serving REST APIs, but cannot call out to them?



Kind regards,
Charlie


P.S: any links to any other resources, manuals, help or examples would be 
hugely appreciated and Google is not as fruitful as I'd hope :|

-- 
You received this message because you are subscribed to the Google Groups 
"mongoose-users" 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/mongoose-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to