Giter Club home page Giter Club logo

Comments (4)

harold avatar harold commented on July 23, 2024 1

XML in the url? An interesting choice.

Maybe you need to url escape the string before making the request?

from http-kit.

ptaoussanis avatar ptaoussanis commented on July 23, 2024

@IliasDeros Hi Ilias! @harold is correct. As the error message indicates:

Illegal character in query at index 67

So you've got an illegal character at position 67 of your string. The 67th character is \<, which isn't a valid URL character.

The typical way to use a URL like this, is via URL encoding - like your browser example.
The same link above should also give some pointers re: URL encoding.

Hope that helps, cheers! :-)

from http-kit.

IliasDeros avatar IliasDeros commented on July 23, 2024

Thanks for the help!
✅ Solved with URL encoding:

(println "Response:" @(http-kit/get (str "https://production.shippingapis.com/ShippingAPI.dll?API=Verify&XML="
          (java.net.URLEncoder/encode (str "<AddressValidateRequest USERID=\"" userid "\">"
            "<Address ID=\"0\">"
              "<Address1 />"
              "<Address2>" line1 "</Address2>"
              "<City />"
              "<State />"
              "<Zip5>" zip "</Zip5>"
              "<Zip4 />"
            "</Address>"
          "</AddressValidateRequest>")))))
          
;; Response
;; Received fatal alert: handshake_failure

from http-kit.

IliasDeros avatar IliasDeros commented on July 23, 2024

Note: In case anyone stumbles upon this thread, I resolved that handshake_failure using the following base docker image change:

# Dockerfile
FROM amazoncorretto:8-alpine3.17-jdk

# Instead of: FROM eclipse-temurin:8-alpine

from http-kit.

Related Issues (20)

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.