The Best Way To Send HTTP Requests

แชร์
ฝัง

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

  • @brandonbraner
    @brandonbraner 5 หลายเดือนก่อน +20

    If you are using postman for single requests you are missing the power of it

    • @ljoffrey
      @ljoffrey 5 หลายเดือนก่อน

      For sure. Bruno is a good alternative too

  • @vibes992000
    @vibes992000 5 หลายเดือนก่อน +2

    Thanks for the video. Can you also have part 2 of this video where you process the json responses and set new values of environment variables and then send 2nd http request to some another endpoint after that (using json data values from success response data).

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

    Wow, It will be really helpful for me.
    RIP postman.

  • @ehsangoodarzi2123
    @ehsangoodarzi2123 4 หลายเดือนก่อน

    hi Amichai, thanks for great content.
    just an idea to make it better , it took for times to understand why my visual Studio doesn't recognize .HTTP like yours. and then I installed REST Client extension. now it works.
    edit: you explained it ,sorry my fault😂

  • @sergenalishiwa9097
    @sergenalishiwa9097 5 หลายเดือนก่อน +5

    Postman supports GRPC and more.

  • @SerafimMakris
    @SerafimMakris 5 หลายเดือนก่อน +3

    incredibly good option to send requests through your IDE to check if your application works correctly. My point of view for this http logic are, needed to be add more features to be actual usable like do something with the response body or Code (set attribute based on response message) . :D a big lesson from Amichai again :D

    • @Jianju69
      @Jianju69 5 หลายเดือนก่อน

      I'm still catching up with the rest of the group, but your comment is helpful. So, once we have the application working the way we like, is the .http-file still used in the application (to make HTTP requests,) or is it only for use in the IDE?

    • @exomo1
      @exomo1 5 หลายเดือนก่อน +1

      @@Jianju69 The http files are just for testing and documentation. The application code does not use those files.

  • @BBMG74
    @BBMG74 5 หลายเดือนก่อน

    Wow! Will test it out on Monday. Looks, that it's the first time I really can get rid of Postman

  • @JJ-hg7um
    @JJ-hg7um 5 หลายเดือนก่อน +6

    Thanks for the useful video. I like it. BTW is there a way to automatically fetch the token before a request?

    • @amantinband
      @amantinband  5 หลายเดือนก่อน +4

      You can have the value auto populated via a previous response: github.com/Huachao/vscode-restclient?tab=readme-ov-file#request-variables

  • @ayyubayyubzada4090
    @ayyubayyubzada4090 5 หลายเดือนก่อน +8

    Cant we declare token as dynamically?
    For example, declare it as global variable in somewhere which requests to the authentication endpoint and fetches the token. Based on the response of auth request(from another file), it uses always the newest valid token for all endpoints.

    • @cliffwakefield
      @cliffwakefield 5 หลายเดือนก่อน +2

      This is the use case I would need to move many of my collections away from Postman.

    • @bogdanb904
      @bogdanb904 5 หลายเดือนก่อน

      @@cliffwakefield I don't think this will ever work with SSO also. Which Postman supports.

  • @nirajchandrajoshi
    @nirajchandrajoshi 5 หลายเดือนก่อน +6

    Thank you for this great content ❤.
    I have just one question why you don’t use visual studio ? Or if I ask my question differently then how to use http files in visual studio and where to put token in global variables. Please help.

  • @OlleHellman
    @OlleHellman 5 หลายเดือนก่อน +2

    How do you handle secrets and making sure the token is not checked in?

  • @wildmusical
    @wildmusical 5 หลายเดือนก่อน +2

    Insomnia Rest is also a good client. It is Open source (Apache 2.0), supports GraphQL, REST, WebSockets, SSE and gRPC. You can create test suites, load and edit OpenAPI. It is also extensible with plugins.
    One problem is that the official release now forces you to login (like Postman).
    However, you can use an older release (up to 2023.5.8) or just use a fork which cuts the login.

    • @orecruncher7930
      @orecruncher7930 5 หลายเดือนก่อน +4

      I find this "login trend" somewhat concerning. If I am working on an API that is internal to my organization, the last thing I need is to provide the definition for said API to a 3rd party.

  • @afgone123456
    @afgone123456 5 หลายเดือนก่อน +12

    How to would you do the environment management in VS?

    • @po6577
      @po6577 5 หลายเดือนก่อน +4

      this is probably the most important thing postman can do, without this, i will not event think about switching to any tool

    • @chunRayne24
      @chunRayne24 5 หลายเดือนก่อน

      That will be a game changer if added to http files

  • @exomo1
    @exomo1 5 หลายเดือนก่อน

    Nice video. It looks like VS Code or any other IDE that has support for http files can be used a replacement for postman in a lot of cases. Still it's missing some of the features that make Postman a great tool. What I need the most is authentication (e.g. OAuth2) and token management and a way for scripting requests (e.g. calculating a challenge/reponse value).

  • @abhishekbagchi6052
    @abhishekbagchi6052 5 หลายเดือนก่อน +3

    Cool video. One Question what if I want to update the token in Environment value from a request

  • @soverain
    @soverain 5 หลายเดือนก่อน +4

    The fact that environment variables are stored in a vs code workspace config file seems like a big no to me. On my team everyone has its own config file stuffed with plugins configurations.

    • @bogdanb904
      @bogdanb904 5 หลายเดือนก่อน

      Yup. That's a bit of bs. Also would force everyone into using VS Code.

    • @soverain
      @soverain 5 หลายเดือนก่อน

      @@bogdanb904 I think env variables are handled differently on other IDES.

    • @dweblinveltz5035
      @dweblinveltz5035 5 หลายเดือนก่อน

      Also not a fan. There should be some .http specific env file similar to Node's dotenv.

  • @DeejayMAK11
    @DeejayMAK11 5 หลายเดือนก่อน +3

    Is there a way to create variable which will have dynamic values (from a response of another endpoint)?

    • @blank001
      @blank001 5 หลายเดือนก่อน

      In Postman yes, not sure about this one

  • @Noceo
    @Noceo 5 หลายเดือนก่อน

    Would love to see a video on how/if this can be utilized in a test setting. E.g. calling a number of endpoint in the CD pipeline, after deployment.

  • @vitek0585
    @vitek0585 5 หลายเดือนก่อน +6

    It is a great way for simple requests, but when it is necessary to login and then fetch a token to reuse in future requests, this tool is not convenient

    • @geoffreyolson9720
      @geoffreyolson9720 5 หลายเดือนก่อน +1

      Does postman handle that better, because I had the same problem using postman? I would have to login with the browser, then copy the token and manually set the token variable.

    • @vitek0585
      @vitek0585 5 หลายเดือนก่อน

      @@geoffreyolson9720 It is not needed to perform those actions, you just need to parse response and assign extracted value to the variable. That is available in the Tests tab. Here is a short example: let responseData = pm.response.json();
      pm.environment.set("categoryId", responseData[0].id);
      Get first element of the array and assign id value to the variable. After that the categoryId is available for the further requests

    • @vitek0585
      @vitek0585 5 หลายเดือนก่อน +2

      No need to perform those manual actions. There is Tests tab where the response result can be handled. To extract and assign the value to the environment variable just need to parse response: let responseData = pm.response.json();
      pm.environment.set("categoryId", responseData[0].id);
      In the example above I get the first item and assign extracted id to the environment variable. After that the variable can be used as value for the further requests

    • @GabrieleCannata
      @GabrieleCannata 5 หลายเดือนก่อน

      @@vitek0585 Exactly. Not a Postman fan, but that tool is on another level. Also standard OAuth2 authentication are handled automatically.

    • @QuintonCraig
      @QuintonCraig 5 หลายเดือนก่อน

      @@geoffreyolson9720 just use the authorization of the collection, and configure the request to inherit the token from the collection

  • @artiefischel2579
    @artiefischel2579 5 หลายเดือนก่อน

    Thanks. I never could figure out Postman.

  • @michaldivismusic
    @michaldivismusic 5 หลายเดือนก่อน +8

    The http file is nice, but is there a way to automatically generate it from an Open API spec? Keeping these up to date sounds like a pain.

    • @Petrovich2049
      @Petrovich2049 5 หลายเดือนก่อน

      It’s a pain only if you already have a big undocumented api. Otherwise for every api update just update the doc, realistically your api doesn’t /shouldn’t change so much that it becomes a drag, and in the end you have a doc written by a human with nuances explained, so later on your consumers waste less of your time with questions.

    • @QuintonCraig
      @QuintonCraig 5 หลายเดือนก่อน

      @@Petrovich2049 Postman will generate the collections based on an OpenAPI spec. If you are new to a proj, this can save a crazy amount of time when you need to get a workable collection online.

  • @Amr-Ibrahim-AI
    @Amr-Ibrahim-AI 5 หลายเดือนก่อน

    Thank you for the comprehensive video.
    What's the software you use to add annotations to the video? I mean those neon-like rectangles and arrows.

  • @knkootbaoat6759
    @knkootbaoat6759 5 หลายเดือนก่อน +3

    i smashed that subscriber button and looking forward to the future vids

  • @DrHeinzDoofenshmirtz
    @DrHeinzDoofenshmirtz 5 หลายเดือนก่อน +1

    Please also get into how to avoid to write API keys and other secrets in the .http files.

  • @KevinLyda
    @KevinLyda 5 หลายเดือนก่อน

    Define an OpenAPI document. Use those tools to test the API, generate the server and client, verify requests and responses, etc.

  • @petter.envall
    @petter.envall 5 หลายเดือนก่อน +1

    It is unfortunate that the variables are stored in the vscode settings instead of something like a file in the root of the httpfiles, or project root for that matter

  • @legui444532
    @legui444532 5 หลายเดือนก่อน

    It's basically using postman with a lot of extra steps, I think i don't need another thing to manage😅, but maybe I will have to learn this at some point of my carreer 😐

  • @FarukLuki111
    @FarukLuki111 5 หลายเดือนก่อน +1

    Postman was SO MUCH MORE features than what you show here! So far away from „rip postman“!

  • @aaartist_yt
    @aaartist_yt 5 หลายเดือนก่อน +2

    I use this extensions for a while (~2-3 years) now. This way to do and organize the requests is still highly underrated. 👍
    PS: How do you to this colored marks in your screencast? Is this a post-production or do you draw them live?

    • @amantinband
      @amantinband  5 หลายเดือนก่อน +1

      Live - it’s called presentify

  • @djchen1
    @djchen1 5 หลายเดือนก่อน +2

    Does anybody still use curl? I find it handy while working on barebone VMs. Also if you installed tools like proxyman it can trace all http/rest requests made in your system

  • @gjermundification
    @gjermundification 5 หลายเดือนก่อน +1

    Postman? There is cURL.

  • @congjuny
    @congjuny 5 หลายเดือนก่อน +1

    does it do prescript, test, or read variable values from a file etc?

  • @hoanghaitruong9209
    @hoanghaitruong9209 5 หลายเดือนก่อน +1

    haha so how about to share your api to non-dev teammate example QA to try the api?

  • @MacheteBang
    @MacheteBang 5 หลายเดือนก่อน +3

    More of a vscode question, but is it possible to have multiple workspace settings files? I.e. i want one that has all the "public" settings and a second that has user / password in gitignore (but not in the "user" settings as they are shared across many projects.)

  • @mauricioaviles6914
    @mauricioaviles6914 4 หลายเดือนก่อน

    Have you used hurl? How does it compare to http files?

  • @fezhaez
    @fezhaez 5 หลายเดือนก่อน +1

    If you delete postman how do you browse the internet?

  • @ChrisWard74
    @ChrisWard74 5 หลายเดือนก่อน +1

    So I can do this all in postman. What about populating the variable with a HTTP call? Say I have an API call to get a token and then want to use that token in other API calls? I can do this in Postman, can it be done with this?

  • @ylazerson
    @ylazerson 5 หลายเดือนก่อน

    great video - thanks!

  • @MadanaGopalVankaraboina
    @MadanaGopalVankaraboina 5 หลายเดือนก่อน

    @amantinband please make a play list for rest api you are teaching perfectly like beginner to masterrest api's. if not possiblle please suggest a one rest api tutorial to become master. Thank you

  • @xBodro
    @xBodro 5 หลายเดือนก่อน +4

    Cool but not even close to what postman offers out of the box.

  • @SouravBanik90
    @SouravBanik90 5 หลายเดือนก่อน

    Can we even use this for writing tests? What’s the point of this? Just to send one request? What if we have to generate the tokens every time for sending a request? How to do that? How to store a value from a request to be sent in another?

  • @JordanHumbertodeSouza
    @JordanHumbertodeSouza 5 หลายเดือนก่อน

    What about when you need to get the bearer token from request a response header? is there a way to update the env variable on the fly?

  • @joseluiseiguren7827
    @joseluiseiguren7827 5 หลายเดือนก่อน

    How do you overwrite the token env variable from a login post request?
    So you don't have to paste the token manually in the env variables file
    Thanks

  • @syedhoque9057
    @syedhoque9057 5 หลายเดือนก่อน +4

    What tool do you use to annotate ?

  • @7th_CAV_Trooper
    @7th_CAV_Trooper 5 หลายเดือนก่อน

    This is slick.

  • @shayvt
    @shayvt 5 หลายเดือนก่อน +3

    Another good one! :)
    Thank you Amichai

  • @DaminGamerMC
    @DaminGamerMC 5 หลายเดือนก่อน +2

    postman only wins because of testing calpabilities and scripts pre and post request

    • @QuintonCraig
      @QuintonCraig 5 หลายเดือนก่อน

      ehh, probably more than that. Runner is pretty huge

  • @Vietnamkid1993
    @Vietnamkid1993 5 หลายเดือนก่อน

    What do you do about storing tokens until they are needed? I use a secure workspace in postman.

  • @fraserm7163
    @fraserm7163 5 หลายเดือนก่อน

    Hopefully this will support NTLM authentication in the future.

  • @gluckchaim
    @gluckchaim 5 หลายเดือนก่อน

    Great content

  • @Mhblabla
    @Mhblabla 5 หลายเดือนก่อน +1

    This is inferior to OpenApi specs and generating clients from that

  • @ricardoribeiro4560
    @ricardoribeiro4560 5 หลายเดือนก่อน +1

    In the case of authentication, is it possible to automatically fill in the token variable when sending the request?

    • @amantinband
      @amantinband  5 หลายเดือนก่อน +3

      Yes, check this out: github.com/Huachao/vscode-restclient?tab=readme-ov-file#request-variables

  • @bnssoftware3292
    @bnssoftware3292 5 หลายเดือนก่อน

    Very cool!

  • @dealerpriest
    @dealerpriest 5 หลายเดือนก่อน

    Superflous use of the phrase "go ahead and..." has popped up all over youtube. I wonder what's the reason behind this?

  • @devmarkmonster
    @devmarkmonster 5 หลายเดือนก่อน

    The Jetbrains IDE also has a similar plugin, however they are not fully compatible with each other :-(.

    • @kewqie
      @kewqie 5 หลายเดือนก่อน

      Rider supports http files by default, no external plugin needed.

    • @devmarkmonster
      @devmarkmonster 5 หลายเดือนก่อน

      @@kewqie yes but the http files are not 100% compatible

  • @AslamNazeerShaikh
    @AslamNazeerShaikh 5 หลายเดือนก่อน

    Great thanks ❤🎉

  • @d47im5e
    @d47im5e 5 หลายเดือนก่อน

    Nah, this one needs some work. For simple rest clients, I think IDEA's http client is better, In any project i can write http files, and i can write javascript code before and after each request that can do tests, set global variables and use them in other requests. But this extension seems good for this use case... Congrats and keep it up!

  • @Eirenarch
    @Eirenarch 5 หลายเดือนก่อน +3

    I always enjoy when people who advocate for feature folders forget about them when faced with non .cs file extension :)
    Services folder - bad, entities folder - bad, requests folder - totally different, this one is good :)

  • @马剑-i2q
    @马剑-i2q 5 หลายเดือนก่อน

    how to stream response as I call OpenAI's API?

  • @fedor_U
    @fedor_U 4 หลายเดือนก่อน

    Things get ugly if you try to send encoded form data...

  • @rnavedojr
    @rnavedojr 5 หลายเดือนก่อน

    That's cool, but I personally prefer postman because of all the functionalities it has.

  • @tidus93
    @tidus93 5 หลายเดือนก่อน

    Are enviroment variables able to be handled the same way for .http files in Rider/VS aswell?

  • @cliffwakefield
    @cliffwakefield 5 หลายเดือนก่อน

    Is there a way to define environments and variables that works across IDE's?

    • @pilotboba
      @pilotboba 5 หลายเดือนก่อน

      Probably not... since this is for the VS code plugin. But, would be nice it possible. That said, many times you don't want those stored with your source. Would be nice though it if supported .env files and or environment variables and then all IDS could adopt that.

  • @arsenaghajanyan9741
    @arsenaghajanyan9741 5 หลายเดือนก่อน

    Is there a way to preserve cookies sent from api for the following requests?

  • @chrisnuk
    @chrisnuk 5 หลายเดือนก่อน

    It needs NTLM authorisation added

  • @tchial0
    @tchial0 5 หลายเดือนก่อน +13

    Hahaha! The postman team will hate this video.

    • @amantinband
      @amantinband  5 หลายเดือนก่อน +9

      To be fair postman is an excellent product with a ton of features, but I completely replaced it with http files over the past few years

    • @avatar201206
      @avatar201206 5 หลายเดือนก่อน +6

      What about writing to the env. after a request has been send?

    • @jeffersantosss
      @jeffersantosss 5 หลายเดือนก่อน

      @@avatar201206 great question

    • @matthewbramer7654
      @matthewbramer7654 5 หลายเดือนก่อน

      ​@@amantinbandHow can you use rest client without storing an API key in settings.json?

  • @egozMaster
    @egozMaster 5 หลายเดือนก่อน

    i dont want create files just for make request

  • @shomari169
    @shomari169 5 หลายเดือนก่อน

    Did you vscode or vs in your coursed please?

  • @cocacola7535
    @cocacola7535 5 หลายเดือนก่อน

    But how can we upload file with http files?

  • @MrYerak5
    @MrYerak5 5 หลายเดือนก่อน

    Dont forget to ignore files in git with sensative data

  • @QuintonCraig
    @QuintonCraig 5 หลายเดือนก่อน

    Seems like way more work for no benefit other than to avoid postman.
    MS Edge has basic functionality, imports collections, etx. Probably more useful than this lol

  • @zebraforceone
    @zebraforceone 5 หลายเดือนก่อน

    I use insomnia these days, it's quite good

  • @MaThMaTa1000
    @MaThMaTa1000 5 หลายเดือนก่อน

    Too much of a hassle to work with GraphQL tho

  • @DrHeinzDoofenshmirtz
    @DrHeinzDoofenshmirtz 5 หลายเดือนก่อน

    I just watched the intro, and I am thinking: Please convert me!

  • @Fanatic17
    @Fanatic17 5 หลายเดือนก่อน

    honestly insomnia is better for defining tokens and variables

  • @monterreymxisfun3627
    @monterreymxisfun3627 5 หลายเดือนก่อน +1

    I still prefer the plain old Python requests library.

  • @Dough296
    @Dough296 5 หลายเดือนก่อน

    Nice share !
    Is there a way to create a auth.http file so it retrieves the token + stores it in a workspace variable ?
    This way we should not need to manage tokens by hand.

  • @kukulis100
    @kukulis100 5 หลายเดือนก่อน

    microsoft minion

  • @amirdaraee
    @amirdaraee 5 หลายเดือนก่อน +2

    Dislike for the clickbait. postman is much more than just a tool for sending requests. Ability to write scripts to run before and after a request, creating collections, the cli, convenient ui and much more.

    • @Petrovich2049
      @Petrovich2049 5 หลายเดือนก่อน

      It’s such a slow and heavy app, costs another subscription too. Many features you listed can be easily replicated in vs code and I’d argue more convenient to use too.
      But personally I’m using Obsidian instead

  • @tommcmeekin1
    @tommcmeekin1 5 หลายเดือนก่อน

    Hey, does anyone know why adding in an api key header works in vs but not in vsc: X-API-KEY: thisismyverysecurekey

    • @nanonukes
      @nanonukes 5 หลายเดือนก่อน +1

      If the api parses your request in a case sensitive manner, you may encounter this behaviour. Rest client makes it all lowercase iirc.

  • @James-l5s7k
    @James-l5s7k 5 หลายเดือนก่อน +2

    Never liked postman.

    • @T___Brown
      @T___Brown 5 หลายเดือนก่อน

      The tabs system drives me crazy