Namespace HttpMigration

HTTP migration application composer from OpenAPI document.

HttpMigration is a module for composing HTTP migration application from the OpenAPI document. It is designed for helping the OpenAPI generator libraries, which converts OpenAPI operations to an RPC (Remote Procedure Call) function.

The key feature of the HttpModule is the HttpMigration.application function. It converts the OpenAPI operations to the HTTP migration route, and it normalizes the OpenAPI operations to the RPC function calling suitable route structure.

The other functions, HttpMigration.execute and HttpMigration.propagate, are for executing the HTTP request to the HTTP server. The HttpMigration.execute function returns the response body from the API endpoint when the status code is 200 or 201. Otherwise, it throws an HttpError when the status code is not 200 or 201. The HttpMigration.propagate function returns the response information from the API endpoint, including the status code, headers, and response body.

The HttpLlm module is a good example utilizing this HttpMigration module for composing RPC function calling application. The HttpLlm module composes LLM (Large Language Model) function calling application from the OpenAPI document bypassing through the IHttpLlmApplication type.

Jeongho Nam - https://github.com/samchon

Interfaces

IFetchProps

Functions

application
execute
propagate