Skip to content

Support using sockaddr_un scheme with Invoke-RestMethod. #8314

Closed

Description

Summary of the new feature/enhancement

Support using "sockaddr_un" (AF_UNIX sockets) with Invoke-RestMethod.

Proposed technical implementation details

Example usage:
`Invoke-RestMethod sockaddr_un://var/run/docker.sock/containers/json

As far as I understand the socket layer should behave the same so no big changes in the code, except adding the scheme and address family option. I don't think this should affect Powershell code.
System.Uri will need to support new scheme, which obviously means changes in framework & core.

Activity

  1. SteveL-MSFT commented on Nov 19, 2018

    @SteveL-MSFT
    Member

    If CoreFx supports this, we can support it. Until then, I don't think it makes sense to specialize it into the cmdlet.

  2. tdaniely commented on Nov 19, 2018

    @tdaniely
    Author

    Actually I'm not sure if the dotnet people will go for this. The protocol is still HTTP. That the transport is different doesn't really matter.

    With curl you do it like this:
    curl -XGET --unix-socket /var/run/docker.sock http://localhost/containers/json

    So maybe the answer isn't core support. Probably warrants some design discussion.

  3. iSazonov commented on Nov 20, 2018

    @iSazonov
    Collaborator

    It is not standard scheme and it is absent on Windows so I think we can close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueWG-Cmdletsgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions