{"@attributes":{"version":"2.0"},"channel":{"title":"DEV Community: Elena Lape","description":"The latest articles on DEV Community by Elena Lape (@elenalape).","link":"https:\/\/dev.to\/elenalape","image":{"url":"https:\/\/media2.dev.to\/dynamic\/image\/width=90,height=90,fit=cover,gravity=auto,format=auto\/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F647140%2Fc6c4d7e5-5c0a-4ff3-b5c4-40b0281b9690.jpeg","title":"DEV Community: Elena Lape","link":"https:\/\/dev.to\/elenalape"},"language":"en","item":[{"title":"Introducing Holopin: the digital badge platform for developers!","pubDate":"Tue, 27 Sep 2022 09:15:05 +0000","link":"https:\/\/dev.to\/elenalape\/introducing-holopin-the-digital-badge-platform-for-developers-2hlk","guid":"https:\/\/dev.to\/elenalape\/introducing-holopin-the-digital-badge-platform-for-developers-2hlk","description":"<p>We are <em>so<\/em> excited to introduce you to <a href=\"https:\/\/holopin.io\" rel=\"noopener noreferrer\">Holopin<\/a> \u2014 the platform for creating and collecting digital badges! Holopin has been in the works for a while, and we are thrilled to finally share it with you.<\/p>\n\n<p>\ud83d\udce3 PSA: <a href=\"https:\/\/hacktoberfest.com\" rel=\"noopener noreferrer\">Register for Hacktoberfest<\/a> to receive a Holopin!<\/p>\n\n<h1>\n  \n  \n  Why we built Holopin\n<\/h1>\n\n<p>As developers, we love collecting things. We have stickers on our laptops, pins on our backpacks, and stats on our GitHub profiles. We love to show off our achievements and share them with others. I couldn't tell you how many times I've been asked, \"What's that sticker on your laptop?\" or \"Wow, that's a cool T-shirt! Where did you get that?!\".<\/p>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F13gedzqlvq5gwshf53dn.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F13gedzqlvq5gwshf53dn.png\" alt=\"developer laptop\"><\/a><\/p>\n\n<p>But we also know that collecting things can be a lot of work! They take up space, and it's hard to organize them. And don't get me started on what happens when you lose something you've collected. It's a bummer.<\/p>\n\n<p>At the same time, we recognized that organizations love to reward people! Unfortunately, in an increasingly remote world, it is hard to give out physical things. Not to mention that swag is expensive and not always sustainable.<\/p>\n\n<p>Digital badges seem like the perfect solution. But the existing platforms are... kind of boring. They are too clunky, formal, and don't provide a great deal of personalization for the end user.<\/p>\n\n<p>So we built <a href=\"https:\/\/holopin.io\" rel=\"noopener noreferrer\">Holopin<\/a>: a platform that allows you to create and collect digital badges. All in a way that people actually enjoy! \ud83d\udc8c<\/p>\n\n<h1>\n  \n  \n  Features\n<\/h1>\n\n<p>The inspiration for the design came from none other than laptop stickers. We wanted to create a platform that reflected the fun and playful nature of collecting things, while at the same time providing legitimacy and authenticity.<\/p>\n\n<p>Here are a few sticky Holopin features that we are particularly excited about.<\/p>\n\n<p><strong>\u2728 SaaS Platform<\/strong><\/p>\n\n<p>Holopin is a dual-sided digital badge platform. It lets organizations create, issue and manage digital badges in a single place, and people to collect and show off their badges across the web.<\/p>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhz5flhmhsgnox9c20ju0.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhz5flhmhsgnox9c20ju0.png\" alt=\"backstage holopin organization\"><\/a><\/p>\n\n<p>To create an issuable badge, an organization can upload an image and provide some metadata for it. Badges are sent to users via email.<\/p>\n\n<p>Our SaaS platform is used by customers ranging from solo-developer startups, all the way to Enterprises, who have many different sub-teams and departments.Holopin organizations can include multiple members with different permission levels.<\/p>\n\n<p><strong>\u2728 API Integration<\/strong><\/p>\n\n<p>Each organization is able to issue our badges using our API by providing the recipient's email address. This way, the organization can automate the process of issuing badges.<\/p>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr450y150jqxnts00uqxb.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr450y150jqxnts00uqxb.png\" alt=\"holopin api docs\"><\/a><\/p>\n\n<p>Organizations can set up API triggers in their onboarding flows, training modules, marketing tools etc. to send a Holopin badge to the user when they complete a certain action or click a button.<\/p>\n\n<p><strong>\u2728 User badge boards<\/strong><\/p>\n\n<p>One of the stickiest features of Holopin is that folks can pin their claimed Holopin badges on a personal badge board. Similarly to how you would stick your favorite stickers on the back of your laptop.<\/p>\n\n<p>Holopin comes with an editable badge board.<\/p>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjutf39ykv1uw8zluvkxn.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjutf39ykv1uw8zluvkxn.png\" alt=\"holopin badge board\"><\/a><\/p>\n\n<p><strong>\u2728 Sharing tools<\/strong><\/p>\n\n<p>Holopin badges can be shared and embedded across places where you spend most of your time as a developer: GitHub, GitLab, Twitter and LinkedIn!<\/p>\n\n<p>Badge boards can be directly embedded on GitHub and GitLab. All you need to do is copy and paste a link on your <a href=\"https:\/\/docs.github.com\/en\/account-and-profile\/setting-up-and-managing-your-github-profile\/customizing-your-profile\/managing-your-profile-readme\" rel=\"noopener noreferrer\">personal README.md<\/a> on the respective website, like this:<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>\n\n[![@elena's Holopin board](https:\/\/holopin.io\/api\/user\/board?user=elena)](https:\/\/holopin.io\/@elena)\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>Users can also directly share each badge on LinkedIn and Twitter. In this way, developers are able to celebrate individual achievements, and organizations get to benefit from an increased brand presence on social media!<\/p>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffwc60p6s9tzgwb1sqrro.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffwc60p6s9tzgwb1sqrro.png\" alt=\"github profile and tweet\"><\/a><\/p>\n\n<h1>\n  \n  \n  What's next?\n<\/h1>\n\n<p>Our amazing team of four are hard at work at implementing the <a href=\"https:\/\/openbadges.org\/\" rel=\"noopener noreferrer\">Open Badges standard<\/a>, which will allow Holopin badges to be interoperable with other badge platforms and turn Holopins into standard, verifiable digital credentials. We are also working on adding more sharing options, such as Slack and Discord.<\/p>\n\n<p>For organizations, we're going to offer analytics and reporting tools, so that they can see how their badges are being used. In addition, we're expanding our API to allow for more customization, and for displaying organization-specific badges on personal badge boards. Collections and tags are also on the roadmap!<\/p>\n\n<p>All of this is to say that we've got exciting times ahead! We are so happy to finally share Holopin with you. We hope you enjoy using it as much as we enjoy building it.<\/p>\n\n<h1>\n  \n  \n  Get a Holopin at Hacktoberfest\n<\/h1>\n\n<p>This year, DigitalOcean are making Hacktoberfest a million times more fun with <a href=\"https:\/\/holopin.io\/@hacktoberfest\" rel=\"noopener noreferrer\">Holopin badges<\/a> that you can earn for various open source contributions throughout the whole month of October.<\/p>\n\n<p><a href=\"https:\/\/hacktoberfest.com\" rel=\"noopener noreferrer\">Register for Hacktoberfest<\/a> today and claim your first Holopin today.<\/p>\n\n\n\n\n<p>From all of us at the Holopin team, happy pinning!<\/p>\n\n<p>Pssst... <a href=\"https:\/\/twitter.com\/holopin_\/status\/1574799157524561922\" rel=\"noopener noreferrer\">Tell us on Twitter<\/a> telling us which developer tool's badges you want to see, and we'll send you a secret badge! ;)<\/p>\n\n<p>\u2728\ud83e\udd96\u2728\ud83e\udd96\u2728<\/p>\n\n","category":["hacktoberfest","opensource","career","news"]},{"title":"5 Handy CLI Tools to Spice up Your Terminal","pubDate":"Fri, 09 Jul 2021 15:09:02 +0000","link":"https:\/\/dev.to\/elenalape\/5-handy-cli-tools-to-spice-up-your-terminal-31do","guid":"https:\/\/dev.to\/elenalape\/5-handy-cli-tools-to-spice-up-your-terminal-31do","description":"<p>The Command Line.<\/p>\n\n<p>A developer's best mate, and also one of the main sources of our frustration (it's <code>esc<\/code>, then <code>:q<\/code> to quit Vim, by the way).<\/p>\n\n<p>Regardless of its social status, there are plenty of great CLI tools that can make quite a difference in the overall terminal experience.<\/p>\n\n<p>Here are some of my favourites, in no particular order. Some are tools that I use every day in my work, and others are just fun apps to try if you get bored of a GUI.<\/p>\n\n<p>Shall we?<\/p>\n\n<h2>\n  \n  \n  1. <a href=\"https:\/\/ohmyz.sh\/\" rel=\"noopener noreferrer\">Oh-My-Zsh<\/a>\n<\/h2>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F467bung2smmypgklrfk9.jpg\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F467bung2smmypgklrfk9.jpg\" alt=\"oh-my-zsh screenshot with wedisagree theme\" width=\"800\" height=\"538\"><\/a><\/p>\n\n<p><a href=\"https:\/\/ohmyz.sh\/\" rel=\"noopener noreferrer\">Oh-My-Zsh<\/a> is a framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, and themes.<\/p>\n\n<p>In short \u2014 Oh-My-Zsh makes the terminal less intimidating by bringing some colour and autocompletion to tools like <a href=\"https:\/\/git-scm.com\/\" rel=\"noopener noreferrer\">Git<\/a> and <a href=\"https:\/\/www.docker.com\/\" rel=\"noopener noreferrer\">Docker<\/a>, as well as plenty of package managers and other popular command line utilities.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code># To install\n$ sh -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/ohmyzsh\/ohmyzsh\/master\/tools\/install.sh)\"\n\n# To configure your plugins, themes, aliases etc.\n$ vi ~\/.zshrc\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Admittedly, my favourite part is that there are lots of different <a href=\"https:\/\/github.com\/ohmyzsh\/ohmyzsh\/wiki\/Themes\" rel=\"noopener noreferrer\">themes<\/a> to choose from \u2014 my favourite is <a href=\"https:\/\/github.com\/ohmyzsh\/ohmyzsh\/wiki\/Themes#wedisagree\" rel=\"noopener noreferrer\"><code>wedisagree<\/code><\/a>.<\/p>\n\n<p>Note that Oh-My-Zsh is for the <strong>ZSH\/Z-Shell<\/strong> (not bash or any other), so make sure you\u2019ve got <a href=\"https:\/\/github.com\/ohmyzsh\/ohmyzsh\/wiki\/Installing-ZSH\" rel=\"noopener noreferrer\">ZSH<\/a> going first.<\/p>\n\n<h2>\n  \n  \n  2. <a href=\"https:\/\/httpie.io\" rel=\"noopener noreferrer\">HTTPie<\/a>\n<\/h2>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fraw.githubusercontent.com%2Fhttpie%2Fhttpie%2Fmaster%2Fhttpie.gif\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fraw.githubusercontent.com%2Fhttpie%2Fhttpie%2Fmaster%2Fhttpie.gif\" alt=\"HTTPie in the terminal\" width=\"800\" height=\"400\"><\/a><\/p>\n\n<p>Ever wanted to make a request to an API or a website, without having to pull out an arsenal of devtools?<\/p>\n\n<p>Say no more \u2014 <a href=\"https:\/\/httpie.io\" rel=\"noopener noreferrer\">HTTPie<\/a> is here to save the day.<\/p>\n\n<p>HTTPie is a CLI HTTP client that comes with colourised output (that goes fashionably well with Oh-My-Zsh's <code>wedisagree<\/code>), really intuitive syntax, and a number of other features to make testing and debugging APIs as simple as it gets.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code># To install with brew\n$ brew install httpie\n\n# To make a request\n$ http httpie.io\/hello\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>One feature I find particularly handy is the <a href=\"https:\/\/httpie.io\/docs\/2.4.0#offline-mode\" rel=\"noopener noreferrer\"><code>--offline<\/code> mode<\/a>, which lets you build and print out a (colourised and formatted) HTTP request without sending it. That way, you can see exactly the stuff the API in question is going to receive.<\/p>\n\n<p>Check out my recent <a href=\"https:\/\/dev.to\/elenalape\/apis-101-getting-started-with-httpie-2o9g\">Getting started with HTTPie guide<\/a> to learn more.<\/p>\n\n<p>Full disclosure: I am part of the HTTPie team. However, I have been using it even before I joined!<\/p>\n\n<h2>\n  \n  \n  3. <a href=\"https:\/\/github.com\/chubin\/wttr.in\" rel=\"noopener noreferrer\">Wttr.in<\/a>\n<\/h2>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fte5m2bi8mg9sezcdvs0v.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fte5m2bi8mg9sezcdvs0v.png\" alt=\"wttr.in weather forecast preview\" width=\"800\" height=\"587\"><\/a><\/p>\n\n<p>Using a command line just for the sake of using a command line?<\/p>\n\n<p>Sign. me. up.<\/p>\n\n<p><a href=\"https:\/\/github.com\/chubin\/wttr.in\" rel=\"noopener noreferrer\">Wttr.in<\/a> is a console-based weather report app. Just add your city to the URL, and send a request like so:<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code># Using HTTPie\n$ http wttr.in\/london \n\n# Or, using cURL\n$ curl wttr.in\/london \n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>I\u2019ve aliased <code>http wttr.in\/London<\/code> with <code>weather<\/code>. So now, each time I want to see the weather forecast for London, I am able to simply type <code>weather<\/code> and save all those precious seconds of having to pick up my phone and navigate to the weather app. <\/p>\n\n<h2>\n  \n  \n  4. <a href=\"https:\/\/kalk.dev\/\" rel=\"noopener noreferrer\">Kalk<\/a>\n<\/h2>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzwsgl326s2oaf4ohx5wo.gif\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzwsgl326s2oaf4ohx5wo.gif\" alt=\"Kalk calculator preview\" width=\"498\" height=\"279\"><\/a><\/p>\n\n<p>Computers have evolved so far ahead from their original purpose, which was to calculate things.<\/p>\n\n<p>Sure, you can and create some sick beats with your machine, or run Overwatch at one bazillion frames per second. <\/p>\n\n<p>But something as simple as <em>calculating<\/em> what grade you need to score in an exam to pass the course is more tricky than it should be. Your default OS calculator is an option, but it's very basic. Google kiiind of does the job, but requires internet connection. So do more advanced tools like <a href=\"https:\/\/www.wolframalpha.com\/\" rel=\"noopener noreferrer\">Wolfram Alpha<\/a>.<\/p>\n\n<p><a href=\"https:\/\/kalk.dev\/\" rel=\"noopener noreferrer\">Kalk<\/a> is... a CLI for a calculator.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code># To install using brew\n$ brew tap xoofx\/kalk \n$ brew install kalk\n\n\n# To launch\n$ kalk\n<\/code><\/pre>\n\n<\/div>\n\n\n\n\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>kalk 0.4.0+3fb73b1 - Copyright (c) 2020-2021 Alexandre Mutel\n# Type `help` for more information and at https:\/\/github.com\/xoofx\/kalk\n\n&gt;&gt;&gt; # You can do things such as\n&gt;&gt;&gt; x=2; round((54+4)\/(4+x))\n\n# x = 2; round((54 + 4) \/ (4 + x))\nx = 2\nout = 10\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>It's simply brilliant both as your regular everyday calculator, and a more advanced one that will solve your equations using the same syntax you'd use in a maths class. <\/p>\n\n<h2>\n  \n  \n  5. <a href=\"https:\/\/taskwarrior.org\/\" rel=\"noopener noreferrer\">Taskwarrior<\/a>\n<\/h2>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyl24k97hju6b6yd5vzze.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyl24k97hju6b6yd5vzze.png\" alt=\"taskwarrior screenshot from wikipedia.org\" width=\"775\" height=\"481\"><\/a><\/p>\n\n<p>It's an open secret that creating to-do lists is peak procrastination, as a queen of procrastination, I'd like to introduce you to one more way <em>to-do<\/em> it.<\/p>\n\n<p><a href=\"https:\/\/taskwarrior.org\/\" rel=\"noopener noreferrer\">Taskwarrior<\/a> is a nifty tool if you want to keep all your <em>actual<\/em> to-dos separate from shopping lists and song lyric ideas that you've got sitting in your note taking app.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code># To install with brew\n$ brew install taskd\n\n# To create a new task (it will prompt you to create a ~\/.taskrc file upon the first run; select yes\n$ task add 'Write a dev.to article about CLI tools'\n\n# To view all pending tasks\n$ task\n\n# To mark task as complete\n$ task &lt;task_id&gt; done\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>You can also annotate, set a priority level or a by-date to individual tasks or their groups.<\/p>\n\n<p>Taskwarrior's <a href=\"https:\/\/taskwarrior.org\/docs\/30second.html\" rel=\"noopener noreferrer\">30 second tutorial<\/a> has got everything you need to get started.<\/p>\n\n\n\n\n<p>Do you have any favourite CLI tools you'd like to share? Please let me know if you give any of the ones listed above a try! <\/p>\n\n<p>I'm going to go finish that burning <code>task<\/code> now.<\/p>\n\n<p>Unless the <code>weather<\/code> is too nice for it.<\/p>\n\n","category":["githunt","productivity","tooling","todayilearned"]},{"title":"Getting started with HTTPie","pubDate":"Thu, 10 Jun 2021 15:57:38 +0000","link":"https:\/\/dev.to\/elenalape\/apis-101-getting-started-with-httpie-2o9g","guid":"https:\/\/dev.to\/elenalape\/apis-101-getting-started-with-httpie-2o9g","description":"<p>Whether you're building your own API, or using a third-party service, it\u2019s a pretty good idea to make sure you can talk to that API reliably.<\/p>\n\n<p>HTTPie is a light but powerful open source HTTP client that allows you to easily communicate with APIs straight from the command line.<\/p>\n\n<p><a href=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fraw.githubusercontent.com%2Fhttpie%2Fhttpie%2Fmaster%2Fhttpie.gif\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/media.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fraw.githubusercontent.com%2Fhttpie%2Fhttpie%2Fmaster%2Fhttpie.gif\" alt=\"HTTPie in the terminal\"><\/a><\/p>\n\n<p>Developers use HTTPie for testing, debugging and exploring various API endpoints to see how they behave under given conditions. HTTPie comes with colorized output, simple syntax and a number of features to make the exploration a breeze!<\/p>\n\n<p>This guide covers the basic usage of HTTPie and provides some examples to get you started. \u2728<\/p>\n\n<h2>\n  \n  \n  Step 1: Install HTTPie\n<\/h2>\n\n<p>The best way to ensure you're installing the latest version of HTTPie is to use <a href=\"https:\/\/pypi.org\/project\/pip\/\" rel=\"noopener noreferrer\">pip, the Python package installer<\/a>.<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\n<span class=\"c\"># Make sure we have an up-to-date version of pip and setuptools:<\/span>\n<span class=\"nv\">$ <\/span>python <span class=\"nt\">-m<\/span> pip <span class=\"nb\">install<\/span> <span class=\"nt\">--upgrade<\/span> pip setuptools\n<span class=\"nv\">$ <\/span>python <span class=\"nt\">-m<\/span> pip <span class=\"nb\">install<\/span> <span class=\"nt\">--upgrade<\/span> httpie\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>On macOS, you can also use Homebrew, by running <code>brew install httpie<\/code>.<\/p>\n\n<p>HTTPie can also be installed using the source code directly, which is available on <a href=\"http:\/\/github.com\/httpie\/httpie\" rel=\"noopener noreferrer\">GitHub<\/a>.<\/p>\n\n<p>HTTPie comes with two commands: <code>http<\/code> and <code>https<\/code>. Once it\u2019s been installed, verify that you\u2019ve installed it by running<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\n<span class=\"nv\">$ <\/span>http <span class=\"nt\">--version<\/span>\n<span class=\"nv\">$ <\/span>https <span class=\"nt\">--version<\/span>\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>and make sure they both return the same version. If you're having trouble installing HTTPie, you can always reach out to the <a href=\"https:\/\/httpie.io\/chat\" rel=\"noopener noreferrer\">HTTPie Discord<\/a> community!<\/p>\n\n<h2>\n  \n  \n  Step 2: Make your first request \ud83e\udd47\n<\/h2>\n\n<p>Completed the installation? Well done! You\u2019re now one step closer to being able to poke and explore various APIs.<\/p>\n\n<p>Make a <em>Hello World<\/em> request:<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\n<span class=\"c\"># The server should say hello back to you!<\/span>\n<span class=\"nv\">$ <\/span>https httpie.io\/hello\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>If you don't specify any request parameters (e.g. some JSON; we'll get to it in a second!), then HTTPie uses the HTTP <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Methods\/GET\" rel=\"noopener noreferrer\">GET method<\/a> implicitly.<\/p>\n\n<p>Therefore, the above example is equivalent to:<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\n<span class=\"nv\">$ <\/span>https GET httpie.io\/hello\n\n\n<\/code><\/pre>\n\n<\/div>\n<h2>\n  \n  \n  Step 3: Send various HTTP requests with HTTPie\n<\/h2>\n\n<p>In short, HTTPie commands use the following format:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\n<span class=\"nv\">$ <\/span>http <span class=\"o\">[<\/span>flags] <span class=\"o\">[<\/span>METHOD] URL <span class=\"o\">[<\/span>ITEM <span class=\"o\">[<\/span>ITEM]]\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>where <code>flags<\/code> are HTTPie behaviour parameters, <code>METHOD<\/code> is HTTP method, <code>URL<\/code> is the webpage or API URL, and <code>ITEM<\/code>s are <a href=\"https:\/\/httpie.io\/docs#request-items\" rel=\"noopener noreferrer\">querystring parameters, request data and\/or headers<\/a>. <\/p>\n\n<p>Run <code>http --help<\/code> or see the <a href=\"http:\/\/httpie.io\/docs\" rel=\"noopener noreferrer\">docs<\/a> to see all available flag options.<\/p>\n\n<h3>\n  \n  \n  HTTP vs HTTPS\n<\/h3>\n\n<p>HTTPie comes with <code>http<\/code> and <code>https<\/code> commands preinstalled to account for both HTTP and HTTPS requests that you're going to make.<\/p>\n\n<p>In the above example, we use <code>https<\/code> to make a request to <code>httpie.io\/hello<\/code> as a shorthand to indicate that <code>https:\/\/httpie.io\/hello<\/code> should be queried.<\/p>\n\n<p>The following is also perfectly valid:<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\n<span class=\"nv\">$ <\/span>http https:\/\/httpie.io\/hello\n\n\n<\/code><\/pre>\n\n<\/div>\n<h3>\n  \n  \n  HTTP Methods\n<\/h3>\n\n<p><code>[METHOD]<\/code> is an optional HTTPie parameter. If you don't specify any request <em>data<\/em> in your command, then we already know that <code>GET<\/code> is going to be used by default. You don't need to type it out.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\n<span class=\"c\"># Get the top GitHub search result for search term \"httpie\"<\/span>\n<span class=\"nv\">$ <\/span>https api.github.com\/search\/repositories?q<span class=\"o\">=<\/span>httpie&amp;per_page<span class=\"o\">=<\/span>1\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>But wait! The above can be simplified. \ud83d\ude0f<\/p>\n\n<p>If you want to add querystring parameters (note: querystring parameters are the ones that appear in the URL as <code>?param1=value1&amp;param2=value2<\/code>, not JSON data), use the <code>==<\/code> shorthand:<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\n<span class=\"c\"># Get the top GitHub search result for search term \"httpie\"<\/span>\n<span class=\"nv\">$ <\/span>https api.github.com\/search\/repositories <span class=\"nv\">q<\/span><span class=\"o\">==<\/span>httpie <span class=\"nv\">per_page<\/span><span class=\"o\">==<\/span>1\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>If you do specify some request data, then HTTPie will use the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Methods\/POST\" rel=\"noopener noreferrer\">HTTP POST method<\/a> by default.<\/p>\n\n<p>You can manually set any HTTP method you need by specifying it in the command: <code>GET<\/code>, <code>POST<\/code>, <code>PUT<\/code>, <code>DELETE<\/code>, <code>PATCH<\/code> and others.<\/p>\n\n<h3>\n  \n  \n  Data\n<\/h3>\n\n<p>To make a request with some querystring parameters, use the syntax described in the above section.<\/p>\n\n<p>You can specify request parameters in JSON using HTTPie's shorthand syntax in your <code>http<\/code> or <code>https<\/code> command.<\/p>\n\n<p><code>=<\/code> is for string values, <code>:=<\/code> for raw JSON, <code>:=@<\/code> for JSON files and <code>=@<\/code> for regular files.<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>\n\n$ http PUT pie.dev\/put \\\n    name=John \\                        # String (default)\n    age:=29 \\                          # Raw JSON \u2014 Number\n    married:=false \\                   # Raw JSON \u2014 Boolean\n    hobbies:='[\"http\", \"pies\"]' \\      # Raw JSON \u2014 Array\n    favorite:='{\"tool\": \"HTTPie\"}' \\   # Raw JSON \u2014 Object\n    bookmarks:=@files\/data.json \\      # Embed JSON file\n    description=@files\/text.txt        # Embed text file\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>HTTPie also lets you submit data as form data. See the <a href=\"https:\/\/httpie.io\/docs#forms\" rel=\"noopener noreferrer\">docs on forms<\/a> to learn how.<\/p>\n\n<h3>\n  \n  \n  Headers\n<\/h3>\n\n<p>By default, HTTPie appends the following headers to your request:<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\nGET \/ HTTP\/1.1\nAccept: <span class=\"k\">*<\/span>\/<span class=\"k\">*<\/span>\nAccept-Encoding: <span class=\"nb\">gzip<\/span>, deflate\nUser-Agent: HTTPie\/&lt;version&gt;\nHost: &lt;taken-from-URL&gt;\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>You can override these headers, or set your own. Just use the <code>Header:Value<\/code> notation, like this:<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>\n\n<span class=\"nv\">$ <\/span>http pie.dev\/headers <span class=\"s1\">'Custom-Header-Name:Custom Header Value'<\/span>\n\n\n<\/code><\/pre>\n\n<\/div>\n\n<p>For details on how to send cookies and authorization headers, or how to work with response headers, see the <a href=\"https:\/\/httpie.io\/docs#cookies\" rel=\"noopener noreferrer\">docs<\/a>.<\/p>\n\n\n\n\n<p>If you've got any questions about HTTPie, catch me on the <a href=\"https:\/\/httpie.io\/chat\" rel=\"noopener noreferrer\">HTTPie Discord<\/a> or <a href=\"https:\/\/twitter.com\/elena_lape\" rel=\"noopener noreferrer\">Twitter<\/a>.<\/p>\n\n<p>That's it for today, folks. Happy hacking!<\/p>\n\n","category":["tooling","tutorial","webdev"]}]}}