12/20/2023 0 Comments Insomnia api toolGet started quickly with Insomnia's Core intuitive interface, and choose from nine unique themes to tailor the experience to you. Define environment variables globally or switch between sub-environments for a seamless development/production workflow. Get started quickly with Insomnia's intuitive interface, and choose from nine unique color themes to tailor the experience to you. Generate code snippets for over thirty language libraries, including Curl, NodeJS, Go, Swift, Python, Java, C, and others. Write less code and g enerate Code Snippets Reuse common values like API keys or session IDs. The program is more than just an HTTP client! Insomnia Rest is collaborative, free, open-source, and cross-platform – making it the perfect companion for both individuals and teams. View status code, body, headers, cookies, and more! Create workspaces or folders, drag-and-drop requests, and easily import and export your data. Specify URL, payload, headers, and authorization all in one place. And then we'll continue with our next lesson.Insomnia Core is a powerful REST API Client and GraphQL with cookie management, environment variables, code generation, and authentication for Mac, Window, and Linux. Some other stuff here, see if you can maybe even break something, just experiment with the express load of it. So if you followed along you should have this going, but what I wanna do now is just take a ten minute break and to give people time to actually experiment with this and go a little further, see if you can make some more routes that aren't just slash, maybe add some other stuff here. We were able to get some data and send some data. And then we responded back with just message ok which is what we got back here in the response. So one thing to note is we got back a message that says okay and then we should see a log on a server that says message. It's gonna do that then I'm gonna send it. So in this case I can put whatever I want. This is where you would type in that json. It's however, they allow you to send json. So in this case in the Sami I can just post a body if you're using any other API tool to do a post request. And then I need to send some data to the API. And then for the post requests it's exactly the same thing so I'm just gonna copy this, I'm gonna duplicate it. Which is exactly what I put here, or here. And it messed up because I misspelled localhost. So I'm gonna go ahead and run that request. So the url is just gonna be exactly this, 3000. So it's just gonna be the entry point to the server. So that'll be the url, and then the path that I want to hit is just gonna be right here, /root as in nothing. So for us, it's gonna be localhost, I put in port 3000. Remember, I said it's gonna connect to localhost on that part that we pass in. And then I'll add the URL for our server. And I'm just gonna go ahead and add a new route, a new request for our server. I like it because it has support for GraphQL too, which is really cool. This is just how I interact with my APIs. If you prefer, you can use whatever CLI tool that you want or Postman. So everyone should be able to download it if you want to. It looks like it works for Windows and Linux as well. Why did I do that? Insomnia api, there we go, Insomnia REST Client. So if we just go to Insomnia, I shouldn't have Googled that. And you can download that on the Internet. So, that's what I'm gonna use in today's course to interact with the APIs that we will be making. Yeah, I use Insomnia, which I think is way better than Postman and it's free. I've been using this tool called Insomnia, which is very much like Postman, if you ever used Postman before? So normally what people will do is they'll use like some clients on their terminal, all different types of things. But we're doing some post requests too and that's really hard to do from a URL bar. I mean, if you're just doing a whole bunch of GET requests, you can just go to the browser and just type those URLs in the search bar or whatever and just see what happens. So to do that, there's a lot of ways you can do it. > Scott Moss: So now that we're on 3,000, I'm gonna go ahead and interact with our API. Transcript from the "Using Insomnia" Lesson
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |