Skip to content

Support Direct Submission of Requests to HttpServer #768

@naftulikay

Description

@naftulikay

NGINX, Tide, and other web platforms provide the ability to submit a request manually into the web service without any network overhead.

Tide, for instance, provides an into_http_service method on tide::App which returns a http_service::HttpService implementation which has a respond method which accepts an http_service::Request and returns a Future<http_service::Response>.

I'll describe my architecture. I'm building an AWS Lambda function. The way that the Lambda runtime works is that the code polls a local endpoint to receive new events and then invokes a Rust function as a handler. Since it's possible to use Lambda as a serverless HTTP API, I'd like to do this with a Rust web framework. Using a web framework like Actix makes routing/middleware easy.

With Tide, I can do exactly what I'm describing and submit requests locally without network overhead. With Actix Web, I'd have to submit these requests over the loopback interface, which isn't the most efficient thing to do. Otherwise, I'll have to implement middleware and routing myself, which is reinventing the wheel.

Providing the ability to locally submit requests into Actix Web would be extremely helpful in this regard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions