Skip to content

support multiple requests in same code cell #34

Description

@yanghua-ola

Another great plugin from you! I am really impressed. However I faced a little problem. Here is my use case:

  1. run two requests in the same code cell
  2. render only response from the second request

FYI, the first request triggers a CI build and second request checks its results; it could be a common use case.

However it didn't work so well as is. I've tried:

  1. use httpbook with the VSCode built-in renderer, it displays response from both requests
  2. use httpbook with the httpBook - Monaco Editor Renderer, it displays response from first request and doesn't refresh after second request completes
  3. use @no-log on first request, now it breaks the variable reference doe.user and failes, however if I run it a second time, it seems able to resolve the variable somehow, from cached value maybe.

Below is a minimal example. It was really fun to use these plugins you've developed. I am not proficient in TS or VSCode plugin development; but let me see if I can get a grasp of them and contribute back.

###
@user = doe
@password = 12345678
# @name doe
GET https://httpbin.org/basic-auth/{{user}}/{{password}}
Authorization: Basic {{user}} {{password}}

###
# @ref doe
GET https://httpbin.org/basic-auth/{{doe.user}}worked/{{password}}
Authorization: Basic {{doe.user}}worked {{password}}

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions