I'm a beginner, so the only thing I do is searching for codes that already exists on this website en add some stuff to let it do what I want. I haven't the knowledge to write the code by myself.
If you say that your code can handle an GET-request en write some data back to the browser than I can use your code.
Is this the whole code, or is there something more (an library for example)? What is the code to make an connection with the router, so the mbed gets an IP-adres? (I'm sorry if I ask stupid questions, but I'm still a beginner...)
The thing I want to do sounds actually very simple: I want to use my MBED as an web-server (whit his own IP-adres) and I can do an GET-request (using AJAX) on de root-page of that webserver and the MBED needs the query-variables and if it succeeds the MBED have to write an succeed-massage back so the AJAX-request can read it and see that it is succeeded.
I can do this with what I have now, accept for adding that header, so I can't do the AJAX-request.
Hi,
At this time I run an HTTP-server on my mbed using the library lwip. Every time when I visit the web-page of my mbed, the mbed does something with the query-string. That works fine, but I need to access this web-page using an AJAX-request. And because my mbed is an other domain, I get an 'cross-domain-error'. If it was an PHP-website, I could easily add this php-code:
php-code
This allows the AJAX-request and there is no cross-domain-error.
But how can I do this on the mbed?? Is there a way to add header-information??
I hope there is someone who can help me...
Thank you, Olle