Categories
API python

HTTPX: An open stream object is being garbage collected; call “stream.close()” explicitly.

When using HTTPX I get the following error printed sometimes: An open stream object is being garbage collected; call "stream.close()" explicitly. According to these two github issues: An open stream object is being garbage collected; call "stream.close()" explicitly An open stream object is being garbage collected; call "stream.close()" explicitly This is a Python 3.8.0 issue. […]

Categories
API Kong

Kong: Name resolution failed

Sometimes when calling a service on kong you might get a response like this HTTP/1.1 503 Service Temporarily Unavailable Connection: keep-alive Content-Length: 36 Content-Type: application/json; charset=utf-8 Date: Thu, 02 Apr 2020 09:28:06 GMT Server: kong/2.0.1 X-Kong-Response-Latency: 12 { “message”: “name resolution failed” } What does it mean? Kong cannot access the upstream. Make sure the […]

Categories
API virtualisation vmware vcd rest api

How to update, change and delete a storage Profile with VCloud Director REST API

Recently I was tasked with removing a few attached storage profiles from a number of VDC’s in vCloud Director. The task would have been a long and arduous manual task. Fortunately vCloud Director has a REST API (A flippen good one). The reason I say it is good is that it makes proper used of […]

Categories
API

Service for catching your HTTP requests to test a webhook

Here is a great services for testing and capturing your webhook, to see the headers and body variables. https://requestcatcher.com/ http://requestbin.fullcontact.com/

Categories
API python

Building a rest API client or SDK as a python package

The best way to learn ways of building your API wrapper / SDK is to build it yourself from scratch is to look at ones that already exist. Here is a list of python api wrappers you can checkout and view. Most if not all of them are already python packages. Here is a good […]