• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Can not add or modify article in Angular

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a problem, I have created a project for a social network. In a part of the project I'am using Angular routing to add, modify or delete  articles of the blog of the social media user. But the program do not add or modify the article, it can only delete it.

For example this is the page in which the user can write and add the article:



And this is the Angular file correlate, in which there are also all the function:



I do not understand if there are some problem with the "stringify", but the alert messagge is "something went wrong", so I assume that it gives me error, and in the console of Eclipse is displayed this error message:


java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986



 
Marshal
Posts: 4812
604
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to URL-encode your stringified JSON.  It will contain characters which are not permitted in a URI.
 
Daniel Russell
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ron McLeod wrote:You need to URL-encode your stringified JSON.  It will contain characters which are not permitted in a URI.



Thank you, now it works!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic