Hello Friends
I am using the httpclient example from arduino yun for executing a php file that i have on a hosting and it should returns me the datetime. However i get the following error from the arduino monitor:
406 Not AcceptableNot Acceptable
An appropriate representation of the requested resource /WebTekDomo/Clases/clsOpFecha.php could not be found on this server.
Additionally, a 406 Not Acceptable error was encountered while trying to use an ErrorDocument to handle the request.
i get the same result from a simple html file where i put hola
Please tell me what i need to do for this could working fine
PD: Actually when i invoke this php from my pc it returns the date.
PD2: the code that i am using is the following:
#include <Bridge.h>
#include <HttpClient.h>
void setup() {
// Bridge takes about two seconds to start up
// it can be helpful to use the on-board LED
// as an indicator for when it has initialized
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
Bridge.begin();
digitalWrite(13, HIGH);
SerialUSB.begin(9600);
while (!SerialUSB); // wait for a serial connection
}
void loop() {
// Initialize the client library
HttpClient client;
// Make a HTTP request:
client.get("http://www.mydomain.com.ec/Clases/clsOpFecha.php");
// if there are incoming bytes available
// from the server, read them and print them:
while (client.available()) {
char c = client.read();
SerialUSB.print(c);
}
SerialUSB.flush();
delay(5000);
}
Please help me
Kind regards