Friday, September 25, 2026

New VFPX Project: VFPREST

REST services, sometimes called RESTful web services, are a lightweight and scalable way to design networked applications that communicate over HTTP using standard methods like GET, POST, PUT, and DELETE. There are thousands of services available as REST APIs, everything from UPS package tracking to address validation to currency conversion. The Public APIs site alone lists over 1,500 free APIs.

There are lots of ways to make a REST API call in VFP applications:
  • WinHttp.WinHttpRequest, which is built into Windows.

  • West Wind Technologies' wwHTTP class, part of West Wind Internet & Client Tools and West Wind Web Connection.

  • Chilkat Software’s Chilkat utility. Bill Anderson has a wrapper class that makes using Chilkat from VFP easier.

  • CURL, a command-line utility that comes with Windows for transferring data to or from a server via a URL.
However, regardless of which mechanism you choose, there's still lots of complex code to write.

VFPREST is a new VFPX project that makes this job much easier. For simple REST APIs, just subclass the BaseREST class, fill in some properties, and add a method that calls the API function.

Here's an example of a class that accesses Pet Store, an API test site. It has two methods: AddPet to add a pet and GetPet to get information about a pet.
define class PetStoreAPI as BaseREST of BaseREST.prg

* Override parent properties.

	cURL = 'https://petstore.swagger.io/v2/'

* Custom properties.

	protected cAPIKey
	cAPIKey = 'special-key'
	
	nID     = 0
		&& the pet ID
	cName   = ''
		&& the pet name
	cStatus = ''
		&& the pet's status

* Add a pet to the store.

	function AddPet(toParameter)
		This.AddQueryString('apikey', This.cAPIKey)
		llReturn = This.APICall('POST', '200', 'pet', toParameter)
		if llReturn
			This.nID = This.oResponse.ID
		endif llReturn
		return llReturn
	endfunc

* Find a pet.

	function GetPet(tnPetID)
		This.AddQueryString('apikey', This.cAPIKey)
		llReturn = This.APICall('GET', '200', 'pet/' + transform(tnPetID))
		if llReturn
			This.cName   = This.oResponse.Name
			This.cStatus = This.oResponse.Status
		endif llReturn
		return llReturn
	endfunc

* Handle errors.

	protected function HandleErrors(toJSON)
		if pemstatus(toJSON, 'type', 5) and toJSON.type = 'error'
			This.cErrorMessage = toJSON.message
		endif pemstatus(toJSON, 'type', 5) ...
	endfunc
enddefine

(Another class that provides the pet information passed to AddPet isn't shown here for brevity.)

You can download VFPREST from https://github.com/DougHennig/VFPREST or add it to a project using FoxGet.

I'll be showing VFPREST at Virtual FoxFest 2026 so that's yet another reason to attend.

Thursday, September 24, 2026

Virtual Fox Fest 2026: Who's Coming?

Virtual Fox Fest 2026 is on Wednesday and Thursday, October 21-22, 2026.
 
You can see which of your peers have registered and opted into the conference Who's Coming List. We would love to see your name added this coming week if you still need to get registered. Ready to sign up? Just click https://geekgatherings.com/Registration.

Those who register for Virtual Fox Fest get all the materials ahead of the conference and access to the videos immediately after the conference. The videos won't be posted publicly on our YouTube channel until at least May of next year.

Friday, September 11, 2026

Virtual Fox Fest 2026: YouTube Channel Treasures

Virtual Fox Fest 2026 is October 21-22, 2026. If you are curious as to the quality of the content you will see at the conference, check out the Geek Gatherings YouTube Channel where we post sessions a year or so after the conference finishes. The channel has more than 110 videos with session content from Virtual Fox Fest and Southwest Fox conferences over the last six years. That is nearly 140 hours of viewing. Here are some awesome sessions to get you warmed up for this October:

New Session

We've added a new session to the conference: Carta: A New Way to See a Visual FoxPro App: Yours or One You Inherited

Registration

Registration is US$239 by October 6th, so save yourself US$40 by registering today before the price increases on October 7th. This cost includes admission to all live sessions, all session materials (white papers and samples), immediate access to all recorded videos of the presentations, and access to online social events. Register here: https://geekgatherings.com/Registration.

Get your merch!

Order your Virtual Fox Fest gear from https://geekgatherings.logosoftwear.com/. Increase your geek credentials by purchasing shirts, hats, hoodies, fleeces and more with the conference logo.