The HTTP connection allows you to run a server inside a connection which accepts requests from clients. The HTTP connection validates requests it receives against the provided OpenAPI file. It translates each valid request into an envelope, sends the envelope to the agent and if it receives, within a timeout window, a valid response envelope, serves the response to the client.
Create a new AEA:
aea create my_aea
Add the http connection package
aea add connection fetchai/http:0.1.0
aea config set vendor.fetchai.connections.http.config.api_spec_path "examples/http_ex/petstore.yaml"
Install the dependencies:
Write and add your skill:
aea scaffold skill http_echo
We leave it to you to implement a simple http echo skill (modelled after the standard echo skill) which prints out the content of received envelopes.