{"id":18508,"date":"2020-06-25T12:41:50","date_gmt":"2020-06-25T19:41:50","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=18508"},"modified":"2023-12-01T03:27:29","modified_gmt":"2023-12-01T11:27:29","slug":"axios-get","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/axios-get\/","title":{"rendered":"How to Make axios GET and POST Requests"},"content":{"rendered":"\n<p>When you\u2019re building a web application, there may come a time when you want to perform a HTTP request to access an external resource. For instance, suppose you are making a blog. You may want to call an API to retrieve a list of comments to show on each blog post.<br><\/p>\n\n\n\n<p>Axios is a popular JavaScript library you can use to make web requests. In this guide, we&#8217;ll explain how to use axios to make a GET request. We\u2019ll walk through a few examples to showcase how axios works and how you can use it in your code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Axios?<\/h2>\n\n\n\n<p>Axios is a promise-based library that makes it easy to make web requests.<br><\/p>\n\n\n\n<p>You may be wondering: why should I use axios over one of the many other web request libraries out there? It\u2019s true that there are other libraries like fetch that you can use to make GET requests, but axios has a number of advantages these libraries don\u2019t have.<br><\/p>\n\n\n\n<p>Axios supports older browsers, which will allow you to create a more accessible user experience. Axios also comes with built-in CSRF protection to prevent vulnerabilities. It also works in Node.js, which makes it great if you\u2019re developing both front-end or back-end web applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Install Axios<\/h2>\n\n\n\n<p>Before you make a GET request using axios, you\u2019ll have to install the library. You can do so using the following command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>npm install axios --save<\/pre><\/div>\n\n\n\n<p>This command will install axios and save it to your local package.json file. Now you\u2019re ready to start using the axios library.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Make a Request Using Axios<\/h2>\n\n\n\n<p>Getting started with axios is simple. To make a web request, all you need to do is specify the URL from which you want to request data and the method you want to use.<br><\/p>\n\n\n\n<p>Suppose you want to retrieve a list of random facts about cats from the <a href=\"https:\/\/alexwohlbruck.github.io\/cat-facts\/\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">cat-facts<\/a> API. We could do so using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>axios ({\n\turl: \"https:\/\/cat-fact.herokuapp.com\/facts\",\n\tmethod: \"GET\"\n)}<\/pre><\/div>\n\n\n\n<p>This code returns a promise which represents a request that hasn\u2019t been completed yet. In order to retrieve data from this HTTP request, you would use an async\/await function like so:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>const axios = require(\"axios\");\nasync function getCatFacts() {\n\tconst response = await axios ({\n\turl: \"https:\/\/cat-fact.herokuapp.com\/facts\",\n\tmethod: \"GET\"\n})\nconsole.log(response.data)\n}\ngetCatFacts()<\/pre><\/div>\n\n\n\n<p>The server responded with a list of cat facts.<br><\/p>\n\n\n\n<p>When we call this function, an HTTP GET request is made to the cat-facts API. We use an async\/await function so our program does not continue until the web request has been completed. This is because axios returns a promise first. It returns the data from the request it makes after that request has been completed.<br><\/p>\n\n\n\n<p>The axios library comes with a few shorthand commands you can use to make web requests:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>axios.get()<\/li>\n\n\n\n<li>axios.post()<\/li>\n\n\n\n<li>axios.delete()<\/li>\n\n\n\n<li>axios.put()<\/li>\n\n\n\n<li>axios.patch()<\/li>\n\n\n\n<li>axios.options()<\/li>\n<\/ul>\n\n\n\n<p>In this tutorial, we\u2019re going to focus on the <code>axios.get()<\/code> and <code>axios.post()<\/code> methods, which use the same basic syntax as all the other shorthand methods.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Making GET Requests Using axios<\/h2>\n\n\n\n<p>In our last example, we used axios to make a GET request. But, there is a simpler way to make a GET request with axios: using <code>axios.get()<\/code>.<br><\/p>\n\n\n\n<p>Suppose you want to retrieve a list of cat facts, then count how many have been returned. You could do so using the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>const axios = require(\"axios\");\nasync function getCatFacts() {\n\tconst response = await axios.get(\"https:\/\/cat-fact.herokuapp.com\/facts\")\nconsole.log(`{response.data.all.length} cat facts were returned.`)\n}\ngetCatFacts()<\/pre><\/div>\n\n\n\n<p>The code generated this response: 225 cat facts were returned.<br><\/p>\n\n\n\n<p>Let\u2019s break down our code. We have first declared an async function called <code>getCatFacts()<\/code> in which we make a web request.<br><\/p>\n\n\n\n<p>We then use <code>axios.get()<\/code> to retrieve a list of cat facts from the cat-facts API; \u201cresponse.data\u201d holds the response objects and request body from our request.<br><\/p>\n\n\n\n<p>Finally, we use the .length attribute to calculate how many cat facts have been returned from our request. We then add this number into the string \u201ccat facts were returned\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sending Headers Using axios<\/h2>\n\n\n\n<p>When you\u2019re making a GET request, you may need to send a custom header to the web resource to which you are making the request. Suppose you are retrieving data from an API that requires authentication. You may need to specify an authentication header.<br><\/p>\n\n\n\n<p>To specify a header with an axios request, you can use the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>axios.get(\"https:\/\/urlhere.com\", {\n\theaders: { \"header-name\": \"header-value\" }\n})<\/pre><\/div>\n\n\n\n<p>This code would send the header \u201cheader-name\u201d with the value \u201cheader-value\u201d to the URL we have specified.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sending Parameters Using axios<\/h2>\n\n\n\n<p>Many APIs allow you to send parameters in a GET request. For instance, an API may allow you to limit how many responses are returned using a limit parameter.<br><\/p>\n\n\n\n<p>Specifying a parameter to send with a web request is easy using axios. You can either include the parameter as a query string, or use the params property. Here\u2019s an example of axios making a web request using query strings to specify a parameter:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>axios;get(\"https:\/\/urlhere.com\/?date=2020-05-15\")<\/pre><\/div>\n\n\n\n<p>Alternatively, you could specify a params property in the axios options using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>axios;get(\"https:\/\/urlhere.com\/?date=2020-05-15\", {\nparams: {\ndate: \"2020-05-15\"\n}\n})<\/pre><\/div>\n\n\n\n<p>Both of these examples send a parameter with the name \u201cdate\u201d and the value \u201c<a href=\"https:\/\/urlhere.com\/?date=2020-05-15\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">2020-05-15<\/a>\u201d to the specified URL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Make a POST Request Using axios<\/h2>\n\n\n\n<p>The syntax for making a POST request is the same as making a GET request. The difference is you should use the <code>axios.post()<\/code> method instead of <code>axios.get()<\/code>.<br><\/p>\n\n\n\n<p>Suppose you want to make a post request to an API. You could do so using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>axios.post(\"https:\/\/urlhere.com\")<\/pre><\/div>\n\n\n\n<p>You\u2019re able to specify headers and parameters in the same way as you would to make a GET request. Let\u2019s say you want to send the header \u201cName\u201d with the value \u201cJames\u201d with your POST request. You could do so using this code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>axios.post(\"https:\/\/urlhere.com\", {\n\theaders: { \"Name\": \"James\" }\n})<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The axios library is used to make web requests in JavaScript. It can be used on both the front-end using JavaScript or on the back-end using a platform like Node.js. Unlike other web request libraries, axios has built-in CSRF protection, supports older browsers and uses a promise structure. It\u2019s perfect for making web requests.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to start making GET and POST requests using axios like a professional web developer.<\/p>\n","protected":false},"excerpt":{"rendered":"When you\u2019re building a web application, there may come a time when you want to perform a HTTP request to access an external resource. For instance, suppose you are making a blog. You may want to call an API to retrieve a list of comments to show on each blog post. Axios is a popular&hellip;","protected":false},"author":240,"featured_media":18509,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-18508","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-javascript"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"JavaScript","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":"","is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Make axios GET and POST Requests | Career Karma<\/title>\n<meta name=\"description\" content=\"Axios is a JavaScript library used to make HTTP requests. On Career Karma, learn how to make GET and POST requests using axios.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/axios-get\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Make axios GET and POST Requests\" \/>\n<meta property=\"og:description\" content=\"Axios is a JavaScript library used to make HTTP requests. On Career Karma, learn how to make GET and POST requests using axios.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/axios-get\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-25T19:41:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:27:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"How to Make axios GET and POST Requests\",\"datePublished\":\"2020-06-25T19:41:50+00:00\",\"dateModified\":\"2023-12-01T11:27:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/\"},\"wordCount\":990,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/axios-get\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/axios-get\/\",\"name\":\"How to Make axios GET and POST Requests | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg\",\"datePublished\":\"2020-06-25T19:41:50+00:00\",\"dateModified\":\"2023-12-01T11:27:29+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Axios is a JavaScript library used to make HTTP requests. On Career Karma, learn how to make GET and POST requests using axios.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/axios-get\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg\",\"width\":1020,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/axios-get\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/careerkarma.com\/blog\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Make axios GET and POST Requests\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Make axios GET and POST Requests | Career Karma","description":"Axios is a JavaScript library used to make HTTP requests. On Career Karma, learn how to make GET and POST requests using axios.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/axios-get\/","og_locale":"en_US","og_type":"article","og_title":"How to Make axios GET and POST Requests","og_description":"Axios is a JavaScript library used to make HTTP requests. On Career Karma, learn how to make GET and POST requests using axios.","og_url":"https:\/\/careerkarma.com\/blog\/axios-get\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-06-25T19:41:50+00:00","article_modified_time":"2023-12-01T11:27:29+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/axios-get\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/axios-get\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"How to Make axios GET and POST Requests","datePublished":"2020-06-25T19:41:50+00:00","dateModified":"2023-12-01T11:27:29+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/axios-get\/"},"wordCount":990,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/axios-get\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/axios-get\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/axios-get\/","url":"https:\/\/careerkarma.com\/blog\/axios-get\/","name":"How to Make axios GET and POST Requests | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/axios-get\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/axios-get\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg","datePublished":"2020-06-25T19:41:50+00:00","dateModified":"2023-12-01T11:27:29+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Axios is a JavaScript library used to make HTTP requests. On Career Karma, learn how to make GET and POST requests using axios.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/axios-get\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/axios-get\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/axios-get\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/laurenz-heymann-oeUioo29Q14-unsplash.jpg","width":1020,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/axios-get\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/careerkarma.com\/blog\/javascript\/"},{"@type":"ListItem","position":3,"name":"How to Make axios GET and POST Requests"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=18508"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18508\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/18509"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=18508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=18508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=18508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}