Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

jebs89
Community profile jebs89 Level 2
Job title here
Location here
1 BADGE
Level 2

Level 2

Learn more
Joined the community 23-08-2018 12:49:16 AM
Offline
Top badges earned by jebs89
Customize the badges you want to showcase on your profile
Re: While trying to login to AEM using POST having request body, the resource recognizes it as a GET and does not give the request body
Avatar
Boost 1
Level 2
jebs89
Level 2

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
jebs89
- Adobe Experience Manager
I use POSTMAN to send a POST call attaching the request body in it.

Views

382

Likes

0

Replies

2
Re: While trying to login to AEM using POST having request body, the resource recognizes it as a GET and does not give the request body
Avatar
Boost 1
Level 2
jebs89
Level 2

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
jebs89
- Adobe Experience Manager
i use a URL http://admin:admin@localhost:4502/ecat/apps/cat/injectorwebhook. This takes me to the servlet and is treated as a POST and all is good.Logs:inside MerlionWebhookServlet dopostMethod: POSTjsonRequestText : { "fragments": { "DDD001017_id06": { "targetLangs": ["es_XC", "zh_XC"] }, "EEE001018_id01": { "targetLangs": ["fr_FR"] } }}But due to dependent system behavior i cannot use this URL. What is the difference in behavior between these two URLs?

Views

382

Likes

0

Replies

0
Re: While trying to login to AEM using POST having request body, the resource recognizes it as a GET and does not give the request body
Avatar
Boost 1
Level 2
jebs89
Level 2

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
jebs89
- Adobe Experience Manager
This is the printed logs:inside MerlionWebhookServlet doGetinside MerlionWebhookServlet dopostMethod: GETjsonRequestText :

Views

998

Likes

0

Replies

4
Re: While trying to login to AEM using POST having request body, the resource recognizes it as a GET and does not give the request body
Avatar
Boost 1
Level 2
jebs89
Level 2

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
jebs89
- Adobe Experience Manager
@Service({javax.servlet.Servlet.class,javax.servlet.ServletConfig.class,java.io.Serializable.class})@Component@Properties({@org.apache.felix.scr.annotations.Property(name="sling.servlet.paths", value="/apps/cat/injectorwebhook"),@org.apache.felix.scr.annotations.Property(name="service.vendor", value="abc Inc."),@org.apache.felix.scr.annotations.Property(name="sling.servlet.methods", value={"POST"}),@org.apache.felix.scr.annotations.Property(name="sling.servlet.extensions", value={"json"})})publi...

Views

998

Likes

0

Replies

0
Re: While trying to login to AEM using POST having request body, the resource recognizes it as a GET and does not give the request body
Avatar
Boost 1
Level 2
jebs89
Level 2

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
jebs89
- Adobe Experience Manager
I am logging into AEM itself and hitting the resource located at 'resource'

Views

998

Likes

0

Replies

0
Re: While trying to login to AEM using POST having request body, the resource recognizes it as a GET and does not give the request body
Avatar
Boost 1
Level 2
jebs89
Level 2

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
jebs89
- Adobe Experience Manager
As I said I do a POST call only, via POSTMAN. But when i capture the logs from my servlet, the request.getMethod() returns it as a GET. any idea why the method is not identified as a POST, instead a GET?

Views

998

Likes

0

Replies

0
Re: While trying to login to AEM using POST having request body, the resource recognizes it as a GET and does not give the request body
Avatar
Boost 1
Level 2
jebs89
Level 2

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
jebs89
- Adobe Experience Manager
Hi Arun. Thanks for your reply. I understand that we can use your code to extract request body from a POST call. But in my case my POST call is identified as a GET by my servlet. Now how can i get the request body?

Views

998

Likes

0

Replies

2
While trying to login to AEM using POST having request body, the resource recognizes it as a GET and does not give the request body
Avatar
Boost 1
Level 2
jebs89
Level 2

Like

1 like

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
jebs89
- Adobe Experience Manager
http://localhost:4502/ecat/j_security_check?j_username=abc&j_password=abc&resource=/ecat/apps/cat/injectorwebhook is the POST URL used to login to our application and land on the servlet path /ecat/apps/cat/injectorwebhook. It has a request body containing a json snippet. When i do a request.getMethod() in the servlet i get it as a GET and could not have a hold on the json from the request body. Why is it treated as a GET method? how to retrieve the body json from the request?

Views

1.4K

Like

1

Replies

15
Likes from