How to Use Variables in Postman

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 12

  • @cjchand
    @cjchand 6 หลายเดือนก่อน

    Excellent overview of Postman variable types and scopes. Truly appreciate the relevant examples used. This is perfect to help educate my users on the right way to manage secrets. Thanks!

  • @7bagette
    @7bagette ปีที่แล้ว

    Running with a data file was game changer, thank you!

  • @45632476
    @45632476 2 ปีที่แล้ว

    Thank you for a clear explanation. I've expanded my instruments now with "values".

  • @alexr7289
    @alexr7289 2 ปีที่แล้ว

    Is there a way to view the variables used in the API call in the summary screen without having to drill into the call ie show it on the POST line.

    • @postman
      @postman  2 ปีที่แล้ว

      Hey Alex, if you hover over the variable you'll see what it's resolving to.

  • @shirishcin
    @shirishcin ปีที่แล้ว

    difference between int variable and string variable ? how can we declare those ? any difference "{{name}}" and for int as {{idnum}}

    • @postman
      @postman  ปีที่แล้ว

      Postman stores variables as strings. If you want to use an integer variable in a script, you can cast `idnum` to an integer data type, such as `parseInt(idnum)`.

  • @markussiebeneick4075
    @markussiebeneick4075 3 ปีที่แล้ว

    In the how to hide sensitive data section, by replacing Initial value with Enter API Key Here, should you instead say Add API Key in Current Value?

    • @postman
      @postman  3 ปีที่แล้ว

      If used in "Current Value" then the collection would be pulling that text instead of the API Key and therefore the authentication would fail. Replacing the initial value with "add your api key as the current value" would be a good alternative here.

  • @jp-uno
    @jp-uno 2 ปีที่แล้ว

    your example didn't work at 7:25 because it wasn't an integer. How to set to set the variable as an integer?

    • @postman
      @postman  2 ปีที่แล้ว +1

      You can either save the value as an integer instead of string. Or you can cast the value to an integer by using the JavaScript method `parseInt()`.

  • @fabioquixada2316
    @fabioquixada2316 2 ปีที่แล้ว

    Niiiiice!!!