Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a UUID in powerstrip requests #76

Open
aanm opened this issue Mar 30, 2015 · 0 comments
Open

Implement a UUID in powerstrip requests #76

aanm opened this issue Mar 30, 2015 · 0 comments

Comments

@aanm
Copy link
Contributor

aanm commented Mar 30, 2015

I would like to see some sort of UUID in the powerstrip-requests for the pre-post-hooks messages.
That would be a possible way to have adapters to communicate with each other outside powerstrip.

POST /adapter HTTP/1.1
Content-type: application/json
Content-length: ...
{
    PowerstripProtocolVersion: 1,
    Type: "pre-hook",
    Uuid: "de305d54-75b4-431b-adb2-eb6b9e546013",
    ClientRequest: {
        Method: "POST",
        Request: "/v1.16/container/create",
        Body: "{ ... }" or null
    }
}
POST /adapter HTTP/1.1
Content-type: application/json
Content-length: ...

The adapter response wouldn't be changed
For the post-hook the message would be similar:

POST /adapter HTTP/1.1

{
    PowerstripProtocolVersion: 1,
    Type: "post-hook",
    Uuid: "de305d54-75b4-431b-adb2-eb6b9e546013",
    ClientRequest: {
        Method: "POST",
        Request: "/v1.16/containers/create",
        Body: "{ ... }"
    }
    ServerResponse: {
        ContentType: "text/plain",
        Body: "{ ... }" response string
                        or null (if it was a GET request),
        Code: 404
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant