Skip to content

Different HTTP response for each request #10

@amitguptagwl

Description

@amitguptagwl

Currently, a user can create the mapping to serve the response from random files or in a round-robin fashion. (wiki)

-  request:
      url: /stubs/employee/([0-9]+)

   response:
      strategy: random
      files: ["<% url.1 %>.xml","file2.xml","file3.xml"]

Or

-  request:
      url: /stubs/employee/([0-9]+)

   response:
      strategy: random
      files: ["<% url.1 %>.xml","file2.xml",{"name":"file3.xml","status":500}]

But what if a user wants the same behavior but without any response in the body? He can create an empty file and do a hack like this;

-  request:
      url: /stubs/employee/([0-9]+)

   response:
      strategy: random
      files: [{"name":"empty","status":500}, {"name":"empty","status":503}]

We're looking for some meaningful mapping

-  request:
      url: /stubs/employee/([0-9]+)

   response:
      strategy: random
      status: [ 500, 503 ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issuesmall win, trivial, less complex issues. Created to encourage Open Source developmenthelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions