scramjetorg / transform-hub

Scramjet Transform Hub (STH) is a runtime supervisor that can run data processing programs called Sequences and manage local resources on any Linux server, Docker on small edge servers, and even large-scale Kubernetes clusters in the cloud or datacenters. It connects to Scramjet Spaces in Scramjet Cloud Platform.
GNU Affero General Public License v3.0
67 stars 8 forks source link

Change in makeRequest method #991

Closed patuwwy closed 1 year ago

patuwwy commented 1 year ago

What? In this change, modifications were made to the makeRequest method to improve the handling of HTTP requests. Below is a detailed description of the changes:

A new variable expectedEvent was added, which is set to "response" or "continue" depending on the value of options.headers?.Expect. This change allows for more flexible event management depending on the expected HTTP headers.

Logging was changed, adding the event name to the debugging message. Now, instead of logging “making request”, we log “making request and waiting for event”, which gives more information about what event is expected.

The way events are handled by clientRequest was also changed. Now instead of always listening for the response event, we listen for the event specified by expectedEvent.

These changes should improve the handling of HTTP requests and provide more flexibility in handling different types of requests. Please review and approve these changes.

Review checks:

These aspects need to be checked by the reviewer: