Giter VIP home page Giter VIP logo

gopetitionnz's Introduction

header

Hi there πŸ‘‹

Hi I am a developer based in Korea! I stumbled upon this 'coding jungle🏝' and have been surviving through. I am interested in microservices, distributed computing and more cloud based solutions.

πŸ”­ I’m currently working on

  • Todoffin

πŸ”– I’m currently reading

  • μ‚¬μš©μžμ˜ λ§ˆμŒμ„ μ›€μ§μ΄λŠ” UX λ””μžμΈμ˜ 힘

🌱 I’m currently learning

  • Figma UX/UI design
  • Python, R for data analytics
  • C#, Dotnet
  • Typescript, NodeJS, ReactJS (πŸ‘Ά)
  • Azure
  • Docker, Linux, Terraform (πŸ‘Ά)

πŸ“Š STATS

nmsohn's github stats

gopetitionnz's People

Contributors

nmsohn avatar

Stargazers

 avatar

Watchers

 avatar  avatar

gopetitionnz's Issues

CORS preflight request issue

Issue

This issue occurs during running unit tests using Jest.

  console.log
      {
        level: 'error',
        message: 'Network Error',
        timestamp: '2020-09-21 14:19:18',
        config: {
          url: 'https://www.parliament.nz/en/pb/petitions/open?Criteria.Sort=IOBClosingDate&Criteria.Direction=Ascending&Criteria.page=Petitions&Criteria.ViewAll=1',
          method: 'get',
          headers: {
            Accept: 'application/json, text/plain, */*',
            'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 RuxitSynthetic/1.0 v6217406660 t38550 ath9b965f92 altpub',
            'Accept-Charset': 'utf-8'
          },
          transformRequest: [ [Function: transformRequest] ],
          transformResponse: [ [Function: transformResponse] ],
          timeout: 0,
          adapter: [Function: xhrAdapter],
          xsrfCookieName: 'XSRF-TOKEN',
          xsrfHeaderName: 'X-XSRF-TOKEN',
          maxContentLength: -1,
          maxBodyLength: -1,
          validateStatus: [Function: validateStatus],
          data: undefined
        },
        request: XMLHttpRequest {},
        response: undefined,
        isAxiosError: true,
        toJSON: [Function: toJSON],
        stack: 'Error: Network Error\n' +
///....

Expected behaviour

image
without console errors

Actual behaviour

By adding,

"testEnvironment": "node"

the message does not show up on console anymore. However, Jest is using a browser like environment. This indicates the issue will still persists when using a browser.

In Chrome,
image

In Firefox,
The error message does not show up.

This maybe because of cors + localhost

Paginate API

  • Add limit, page when getting a list of petitions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.