ofxHTTP icon indicating copy to clipboard operation
ofxHTTP copied to clipboard

Ajax communication

Open colinbouvry opened this issue 4 years ago • 5 comments

I try to send ajax or XMLHttpRequest from web and example_basic_server_post but I have always :

exception Microsoft C++ : Poco::PathNotFoundException

Any idea ?

colinbouvry avatar Mar 02 '21 22:03 colinbouvry

It sounds like you are missing a file somewhere -- does it say what file is not found?

bakercp avatar Mar 02 '21 22:03 bakercp

I don't know why file not found.

I send $.ajax({ url: "http://127.0.0.1:8999/restart/app" });

from web.

Any idea ?

colinbouvry avatar Mar 03 '21 13:03 colinbouvry

It could be a lot of things. Can you post the full error message / stack trace?

bakercp avatar Mar 03 '21 14:03 bakercp

Exception levée à 0x771646D2 dans example_basic_server_post_debug.exe : exception Microsoft C++ : boost::filesystem::filesystem_error à l'emplacement de mémoire 0x0BE4E588. Exception levée à 0x771646D2 dans example_basic_server_post_debug.exe : exception Microsoft C++ : Poco::PathNotFoundException à l'emplacement de mémoire 0x0BE4EB50. [ error ] FileSystemRoute::handleRequest: Unknown server error: Path not found

colinbouvry avatar Mar 03 '21 14:03 colinbouvry

You are asking for a file route called /restart/app. When the file server tries to serve that file, it can't find it. You need to make sure your are asking for files in your document root or posting to values endpoints (see the example for how to define custom post endpoints)

On Wed, Mar 3, 2021, 7:12 AM MrCobot [email protected] wrote:

Exception levée à 0x771646D2 dans example_basic_server_post_debug.exe : exception Microsoft C++ : boost::filesystem::filesystem_error à l'emplacement de mémoire 0x0BE4E588. Exception levée à 0x771646D2 dans example_basic_server_post_debug.exe : exception Microsoft C++ : Poco::PathNotFoundException à l'emplacement de mémoire 0x0BE4EB50. [ error ] FileSystemRoute::handleRequest: Unknown server error: Path not found

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bakercp/ofxHTTP/issues/59#issuecomment-789742159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACJLRBXSY3SISKDCVWE7YLTBY7VPANCNFSM4YP25TQQ .

bakercp avatar Mar 03 '21 15:03 bakercp