Skip to content

derchrischkya/k8s-async-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This is a simple project to test async-api with rabbitmq.

How to run

  • make start
  • Check definitions folder to see the swagger files of async-api/sync-api

How to test

  • Run the following curl to create a new message
curl --location '127.0.0.1:30000/ping' \
--header 'Content-Type: application/json' \
--data '{
    "message": "test"
}'
{
    "timestamp": "2024-04-29 23:05:55+0000",
    "redirect_uri": "/state/0ea6f343-ea95-489f-9a99-18b099039f57",
    "msg": "Waiting for response message from the server may take some time, grab a coffee and relax",
    "is_async": true
}
  • Check state of the processed data
curl --location '127.0.0.1:30000/state/0ea6f343-ea95-489f-9a99-18b099039f57'
{
    "timestamp": "2024-04-29 23:06:40+0000",
    "msg": "The request is still in progress",
    "completed": false
}
  • Run 10 seconds later
curl --location '127.0.0.1:30000/state/0ea6f343-ea95-489f-9a99-18b099039f57'
{
    "timestamp": "2024-04-29 23:06:40+0000",
    "msg": "The request is completed",
    "completed": true
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published