BHoM / BHoM/HTTP_Toolkit

Make this toolkit/adapter more versatile and available for ASP.NET/web tools.

Open
#134 1 comment 0 reactions 1 assignee Claimed by @Tom-Kingstone View on GitHub
type:feature
Dominant language
C#
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

#### Description:

From my own experience developing web applications, it would be great if I didn't have to write a custom API client with its own BHoM serialiser/deserialiser every time I need to send BHoM objects to and from an API. For this purpose, the HTTP_Toolkit has potential to be useful, but it just isn't developed enough and doesn't allow enough direct customisation to be useful in many cases.

At least having both POST and GET (as push and pull) fully implemented would be a great start, and DELETE should be simple enough. It would also be necessary to have a constructor for the adapter that accepts an HTTP client that the adapter would use to make requests (as opposed to the current where new HTTP clients are created with each request) as some frameworks use HTTP client factories that set up clients in a specific way which isn't possible to use with this toolkit as it is.

Suggest possibly having custom config to allow choosing what form the response comes in (for instance I have in the past written POST endpoints which return a usable BHoM object response so at least that would need to be implemented as an option, or even as default if json response is detected).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.