Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

Query String Support? #116

@DigitalDrifta

Description

@DigitalDrifta

Hi @tylerl0706 and @Tiberriver256

Firstly thanks for the great work done thus far! I really appreciate it and I'm loving Polaris!

I'm trying to find a way to get Polaris to accept a key-value paid in the form of a query string.
I tried ?environment=dev in bold but the URL parser seems to chop off everything from the ? onwards.

New-PolarisGetRoute -Path "/api/v1/workspace?environment=dev" -ScriptBlock {

This is the server response:

PS C:\WINDOWS\system32>
request came in: GET /api/v1/workspace?environment=dev

Parsed Route: /api/v1/workspace

Request Method: GET

This is the client response:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> Invoke-RestMethod http://localhost/api/v1/workspace?environment=dev
Invoke-RestMethod : Not found
At line:1 char:1
+ Invoke-RestMethod http://localhost/api/v1/workspace?environment=dev
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Any ideas? I really need to get the query sting working.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    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