Web Connection User Discussions
Testing my own api with wwwc and vfp on a single server
Gravatar is a globally recognized avatar based on your email address. Testing my own api with wwwc and vfp on a single server
  Michael B
  All
  Nov 17, 2019 @ 11:24am

Rick,

What is the best way to test my own api calls on the 'same' server? I want to post a json request to my own server, process it, and then respond back. I realize that if I am file mode I need at least two instances running to achieve that which is pretty clumsy when you need to debug.

Any suggestions?

Gravatar is a globally recognized avatar based on your email address. re: Testing my own api with wwwc and vfp on a single server
  Rick Strahl
  Michael B
  Nov 17, 2019 @ 03:15pm

Use WebSurge or Postman to test APIs just to see what comes back. If you need to test both client and server code then you have to run FoxPro on both ends but I'd argue you'll be better of using Unit Tests against the business objects that feed the API results.

For local testing WebSurge works well for me - I can quickly create and store requests plus easily share the requests and check them into source control for later testing again.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Testing my own api with wwwc and vfp on a single server
  Michael B
  Michael B
  Nov 18, 2019 @ 07:36am

Thanks looks great. Will give it a whirl.

© 1996-2024