Skip to content

Callback Service Call #106

@guvense

Description

@guvense

When the mock server gets a request after a while sends a request to the given url. This feature might be useful for 3rd API service which works with send notifications. I prepared case:

    {
        "request": {
            "method": "GET",
            "endpoint": "/gophers/01D8EMQ185CA8PRGE20DKZTGSR"            
        },
        "callback": {
            "request": {
                "method": "GET",
                "endpoint": "http://localhost:8089/v1",
                "headers": {
                    "Content-Type": "application/json"
                },
                "body": "{\"test\": \"test\"}"
                    
            },
            "delay" : "5s:10s"
        },
        "response": {
            "status": 200,
            "headers": {
                "Content-Type": "application/json"
            },
            "body": "{\"data\":{\"type\":\"gophers\",\"id\":\"01D8EMQ185CA8PRGE20DKZTGSR\",\"attributes\":{\"name\":\"Zebediah\",\"color\":\"Purples\",\"age\":55}}}"
        }
    }
]

when request get by mock server after given delay, it will send request to "http://localhost:8089/v1""
As mentioned I prepared codes then it works.

Metadata

Metadata

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