Forum - Fetch API JavaScript

Tagged: ,

  • This topic has 3 replies, 2 voices, and was last updated 2 months, 3 weeks ago by University of California Davis 01UCD_INST.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #73311
    University of California Davis 01UCD_INST
    Participant

    Has anyone been able to use the JavaScript Fetch API successfully in a localhost environment in conjunction with the Alma API? I’m getting blocked and I’m not sure if it’s a CORS setting or Fetch itself.

    Thanks, Mark

    #73312
    Ori Miller
    Keymaster

    Hi Mark,
    Yes, probably. Check the browser’s console.
    And dave a look at this blog post: https://developers.exlibrisgroup.com/blog/using-a-simple-proxy-to-add-cors-support-to-ex-libris-apis/
    Hope this helps,
    Ori
    Alma Dev.

    #73336
    University of California Davis 01UCD_INST
    Participant

    This is PERFECT. Thanks Ori (and Josh)!

    -Mark

    #74052
    University of California Davis 01UCD_INST
    Participant

    This works great on my local. Have you ever dockerized this using a docker-compose file? If so, I’m curious what you did. The line commands work on local, but deploying it to a Linux environment is a little trickier.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.