Coder Social home page Coder Social logo

Comments (2)

AAdewunmi avatar AAdewunmi commented on August 14, 2024

Hi @sidneyrens, I had the same problem using Eclipse STS, then I googled the error and found a solution:

java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x000xf70x010x000x000xf30x030x03H0x160xe30xc9Z0x1cr0xc00xc60x7f0x05Y0x08[0x150xa70xaf0xa70xdc0x1b0xf9'0xa5q0x8d;0xe10xd20x180xca0x840xe8 ]. HTTP method names must be tokens

It has to do with using https / http ->

Employee API makes the following call:

$ curl -v localhost:8080/employees

or

$ curl -v https://localhost:8080/employees

Orders API makes the following call:

$ curl -v http://localhost:8080/orders

Essentially, swapping "http" with "https" will fix the problem.

😎

from tut-rest.

robertmcnees avatar robertmcnees commented on August 14, 2024

Hi @sidneyrens. Thank you for the issue. I think I see the problem.

The Problem class you linked to comes from the Spring Framework project. You are correct that this class does not have a create() method, so that code would cause an error.

The correct Problem class should be the one that comes from the Spring HATEOAS project. This one does have an implementation of create().

While the code has the correct implementation in the form of the import:
import org.springframework.hateoas.mediatype.problem.Problem;
The text in the README doesn't call out the imports explicitly, leaving it to the user and their IDE to infer.

I will close the issue for now as I don't think it is a bug. If others have the same issue we can revisit the README and add the import explicitly like we've done in other situations.

from tut-rest.

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.