• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Can not add or modify article in Angular

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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



 
Saloon Keeper
Posts: 2619
329
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • 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
  • 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!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!