How to access json data which is present in payload of angular request in springBoot post API || syncfusion angular calender


Getting the below data in the payload tab of my browser while sending post requests.

Content-Type: application/http; msgtype=request

POST /api/null HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: localhost:4200


enter image description here

Note: I am using a third-party library(syncfusion calendar) where I can’t customize my request in the body part with JSON.

I am only concerned with the above JSON data.

I want to access this data in the post API method(addAppointment) in spring boot.
consider the below code for the controller:

@RequestMapping(value = "/appointment/{batch}" , method = RequestMethod.POST)
public ResponseEntity<?> addAppointment(@PathVariable Map batch,HttpServletRequest request) throws IOException {

/* code required to access that payload JSON data*/


what line of code is required to access that JSON data?
Please help.

Source: Angular Questions

Categorized as angular, java, json, spring-boot, syncfusion-calendar Tagged , , , ,


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us