Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

HTTP GetRequest workflow

Open
#20 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp
Domain
api, networking

Research direction

Start by reviewing the two workflows described around BH.Engine.HTTP.Compute.GetRequest(url), GetRequest, and HTTPAdapter. Compare the proposed Adapter/Pull, implicit-adapter, and Execute approaches, including the suggested BH.Adapter.HTTP.PullRequest(url) entry point and UI implications. Done would require an agreed workflow and terminology before implementation can be scoped.

Written by the indexing model from the issue text.

Description

severity:low type:compliance type:question

Have been playing with the OpenStreetMap_Toolkit leveraging the HTTP_Toolkit 😍 😍 😍
(@rolyhudson)

Did lead to some thoughts around potentially consolidating the http requests to more clearly align with other areas of the BHoM. A few notes for comment - @epignatelli @alelom picking up from our chat earlier. Low priority and great to enable these experiments as some thinking needed I think to create a satisfactorily slick, consistent and clear work flow.

There are currently two implementations of HTTP requests -

  1. following the Adapter/Pull work flow
    Feeding a GetRequest into a Pull with also a HTTPAdapter
  2. A simpler workflow mirroring the expression of a single http request string. Through
    BH.Engine.HTTP.Compute.GetRequest(url) which directly returns the string response

The 2. above is neat - but needs to move out of Engine Compute as is externally interfacing.

The challenge we have is that a traditionally formatted http request contains the domain (i.e. source or adapter in BHoM terms) actually embedded in line with the request itself.
Our standard adapter Pull and Push workflows have naturally separated these concepts out.

Useful to align terminology and concepts where we can - but also be intuitive and respect conventions of the software/platforms we are adapting to.

The main comment I discussed with @epignatelli was to ensure clarity that a link (or adapter) with the outside world to BHoM is still being made. Even if not a standard Adapter -> Pull

So few options:

a)
This has redundant information for http as described above.
image

b)
Could separate out domain and rest of request arguments for the http string - but I think this is unintuitive if already familiar with performing http requests. Others opinions here are welcome - but feels we are forcing too hard into BHoM format!?
image

c)
Could allow not specifying adapter - where is implicit from the request?
image

d)
Could then enable implicit casting of correctly such that work flow might allow
image

e)
An option that might make sense is to achieve very close to the original BH.Engine.HTTP.Compute.GetRequest(url) , respecting the current exception of http, but migrating it to an Adapter NameSpace such that we could have something like BH.Adpater.HTTP.PullRequest(url).
image
This would not currently reflect into UI - so considerations needed there.

f)
Another final option would be that we do this as an extension of the Execute...

image

With this option I think we come close to some of the ideas we had before, where we considered implementing Executes with the actual Adapter not needing to be explicitly defined as additional input - being implicit in the Method you were executing.
This came up originally from discussions about executing external Python scripts etc.
Wonder if this might be a way forward?

Sorry for long notes - wanted to capture thoughts and discussions.
Perhaps one to pick up over a call?

@epignatelli @alelom @adecler @rolyhudson

Dominant language
C#
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BHoM/HTTP_Toolkit

All issues in BHoM/HTTP_Toolkit

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.