Using XMLHttpRequest

Sep 1, 2014 at 11:15 AM
Is it possible to send XMLHttpRequest to server application that is created using Casalblanca SDKs?
Coordinator
Sep 1, 2014 at 7:21 PM
Hi maverick786us,

We support sending any general purpose HTTP request to a server. XMLHttpRequest is an API, but yes I think you should be able to accomplish what you want.

Steve
Sep 2, 2014 at 5:26 AM
My aim is I have a google chrome toolbar / addin / extension. This extension consists of nothing just Javascript, JScript. So from the toolbar the only way send HTTP request is using XMLHttpRequest.
Coordinator
Sep 2, 2014 at 4:39 PM
Hi maverick786us,

The C++ Rest SDK is intended for use with C++. To learn more about how to use XMLHttpRequest in JavaScript I recommend you take a look at the w3schools site.

Steve
Sep 3, 2014 at 5:40 AM
Thanks for the link.

Casablanca SDK is designed to create a mini light server, just like IIS, where we can GET, POST, PUT HTTP Interface.

I know it is designed for use with C++. But my aim is to send an HTTP requst from a CHROME toolbar. Unlike IE toolbar, which is made using pure C++ COM, a CHROME toolbar is made up of pure JavaScript. So the only way of sending an HTTP request from CHROME toolbar is through XMLHttpRequest.

So can you show me some LIVE example where an HTTP request is posted to C++ REST Server from a javascript file?
Coordinator
Sep 3, 2014 at 6:09 AM
Hi maverick786us,

Ah OK I misunderstood. Yes you can create an HTTP server using our http_listener. As far as javascript code I don't have any examples I can share, but I'm sure you can find some online elsewhere.

Steve
Marked as answer by maverick786us on 9/5/2014 at 6:24 AM
Sep 3, 2014 at 7:06 AM
stevetgates wrote:
Hi maverick786us,

Ah OK I misunderstood. Yes you can create an HTTP server using our http_listener. As far as javascript code I don't have any examples I can share, but I'm sure you can find some online elsewhere.

Steve
Thanks Steve
Sep 4, 2014 at 7:42 AM
@Steve, can you also help me in resolving he query I have posted in this thread?

https://casablanca.codeplex.com/discussions/564796
Coordinator
Sep 5, 2014 at 1:12 AM
H maverick786us,

I think roschuma is helping you fine with the issue.

Steve
Marked as answer by maverick786us on 9/5/2014 at 6:24 AM