Cors error when hitting specific parts of API

Hey guys, I’m getting a cors error when I hit a dog api asking for any specific breed. Here’s theDog API documentation. I am fine when I hit it not asking for any breed in particular. This is the jQuery code I’m using to hit the API:

$(document).ready(function() {
  function getDog() {
    let url = ``
    let breed = $('#breed').val().trim();
    if (breed !== 'select one') {
      url = `${breed}/images/random`
      url: url,
      type: 'GET',
      success: data => {
        $('#dogPic').html(`<img src="${data.message}">`)
      error: err => {
  $('#doggo').click(function () {

Any help is greatly appreciated.

You need to look carefully at the API documentation example url. You have a typo.

1 Like

I see that extra s. thanks for the help