Code Monkey home page Code Monkey logo

israelpostalserviceapi's People

Contributors

bennymeg avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

flatroy

israelpostalserviceapi's Issues

Error Cannot read properties of null (reading 'signed')

When I follow the docs, and my code is look like this:

import { IPS, Options } from 'israel-postal-service-api'; const weightInGrams = 20; const serviceType = Options.LocalMailOptions.PARCEL.shipmentType; const serviceSubtype = Options.LocalMailOptions.PARCEL.shipmentSubtypes.regular; const option = serviceSubtype.options.signed; const ips = new IPS(); ips.calculateShippingRate('Israel', weightInGrams, serviceType, serviceSubtype, option).then((response) => { // check out ResponseParser API to see all the available functions console.log(response.getTotalPrice()); }).catch((error) => { console.error('Error:', error); });

It displays an error:
Uncaught (in promise): TypeError: Cannot read properties of null (reading 'signed')

CORS issue

I have CORS issue in Angular 8:

Access to XMLHttpRequest at 'https://www.israelpost.co.il/npostcalc.nsf/CalcPrice?openagent&lang=HE&menuChosen=%D7%9E%D7%A9%D7%9C%D7%95%D7%97+%D7%93%D7%95%D7%90%D7%A8+%D7%91%D7%90%D7%A8%D7%A5~%D7%97%D7%91%D7%99%D7%9C%D7%94&serviceoption=%D7%9E%D7%A1%D7%A0%D7%99%D7%A3+%D7%9C%D7%A1%D7%A0%D7%99%D7%A3&qty=1&shipqty=0&weight=400&cname=' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have tried using Angular Proxy proxy.conf.json, unsuccessfully (but I don't know if it's correct):
{ "/npostcalc.nsf/CalcPrice": { "target": "https://www.israelpost.co.il/", "secure": true, "changeOrigin": true, "logLevel": "debug" } }

Fix bugs

  • shipment options typing bug.
  • local bulk shipment calculation.

Simplify API

Combine abroad and local shipment calculation.

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.