Thank you. I learned the "user" part of it. It would be great if somehow it could be possible to get the bearer token by login into identity provider. And then share it across http files
@swildermuth5 ай бұрын
Yeah, I still have to run the web app and steal the token.
@grumpydeveloper695 ай бұрын
Just like the VS Code Rest Client plugin
@pilotboba5 ай бұрын
It would be nice if it could integrate with the dotnet configuration system as well as the user configuration specified in the project so that you can pull those secrets or user level totally out of the project folder.
@swildermuth5 ай бұрын
It would. You can always do a PR!
@microtech24482 ай бұрын
Hi, did you find a way to set env variable once you have the result from API, just like in postman. An instance can be, you call login api and get the token, anyone would want to save it automatically in the env variable instead of manually copy paste it.
@swildermuth2 ай бұрын
Yes, in Visual Studio, you can create an environment (see upper right hand corner drop-down) that is used by any http files that choose that environment.
@LindenMikus5 ай бұрын
would be cool if there was a way to convert existing postman collections and environments to these type of files
@swildermuth5 ай бұрын
Since these files are *just* text files of the actual requests, I bet it wouldn't be too tough.
@torkilpedersen50145 ай бұрын
Like the length of our presentations☺
@swildermuth5 ай бұрын
Glad you like them!
@DannyHille5 ай бұрын
Neat trick - Thanks 🙂
@swildermuth5 ай бұрын
Glad you liked it!
@roa715 ай бұрын
Thanks. Why moving on from Postman? Better integration with VS or other reasons? Just curious..
@Kingside885 ай бұрын
Because you dont want to have multiple apps open while coding
@pilotboba5 ай бұрын
A couple of reasons. you can check in the files right next to your code. You can stay in the same app to do tests. Granted you can store a Postman collection in your repo, but its a few manual steps, vs checkout and go, add one, commit, and everyone else gets the new HTTP files to use with your new endpoints.
@pilotboba5 ай бұрын
That said, it doesn't really replace Postman or Insomnia, they have a lot more features that are great if you need them. But for just calling endpoints, passing payloads, and checking responses this works.
@swildermuth5 ай бұрын
It's just text files that look like requests. That's why I like it. It doesn't help you as much, but also doesn't paywall anything. I like that it is simpler (and works in VS and VSCode).
@peymannaji5 ай бұрын
What if I have a POST request and ID is generated in backend and I would like to use that in the GET request? I'm asking this question, because I all the tutorials, ID's are always hard coded.
@swildermuth5 ай бұрын
No real way to do that right now. There is a random parameter but I dont' find it useful.
@peymannaji5 ай бұрын
@@swildermuth Thanks 😊 🙏
@paddymcsquirrel5 ай бұрын
Say you want to generate token and use it subsequently, you can name the first request ( in VS Code, maybe also in VS 20*) as a comment before the request, eg ‘# name @login’, then refer to the response in subsequent requests using, e.g {{login.response.body.token}} (when response body is json), you can separate requests using ###
@paddymcsquirrel5 ай бұрын
So if the id is returned in the response to the first post, it should be possible to use it later