Skip to content

Specifying Query Parameters for call: HTTP  #910

Closed
@matthias-pichler

Description

@matthias-pichler

What would you like to be added:

Would it make sense to add a structured way to add query parameters to uris when using call: http?

document: {}
do:
  - listPets:
      call: http
      with:
        method: get
        endpoint: 
          uri: https://petstore.swagger.io/v2/pets
        search:
          page[size]: ${ .pageSize }
          str: "Some string with characters & stuff that would need to be uri percent encoded! 👍 "

We could use the name "search", "query", "searchParameters", "queryparameters" or "parameters"

Why is this needed:

right now it is somewhat painful to specify these things using a runtime expression because we'd need to use the @uri format. And @uri also only encodes interpolated strings so the keys would have to manually encoded

document: {}
do:
  - listPets:
      call: http
      with:
        method: get
        endpoint: 
          uri: ${ @uri "https://petstore.swagger.io/v2/pets?page%5Bsize%5D=\(.pageSize)&str=\(\"Some string with characters & stuff that would need to be uri percent encoded! 👍 \")" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: specChanges in the Specificationchange: featureNew feature or request. Impacts in a minor version change

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions