I am trying to test my doPost method on my localhost.
I have removed POST method from the Apache Sling Referrer Filter.
I have checked that
check that the POST method is NOT in the filter methods of the CSRF filter config
http://localhost:4502/system/console/configMgr/com.adobe.granite.csrf.impl.CSRFFilter.
But my post request in Postman returns 403 - Forbidden - Authentication Failed
I would appreciate it if anyone has had experience with testing doPost methods in a sling servlet from a rest client if they could assist.
regards
Clive Stewart
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
Please try this:-
1. http://localhost:4502/system/console/configMgr
2. Search for 'Apache Sling Referrer Filter'
3. Remove POST method from the filter. Then you can call your POST method anywhere.
4. Select “Allow Empty”
I hope this would help you.
~kautuk
Views
Replies
Total Likes
See my Java Swing article that posts files to AEM nodes. You can try the same thing to test your servlet - see the syntax of the servlet:
https://helpx.adobe.com/experience-manager/using/post_files.html
PS - this is my main way of uploading files (JAR, JS, etc) to AEM nodes.
Views
Replies
Total Likes
You're posting to the author instance so make sure you are supplying a valid username and password to generate an authorization header. You can choose the authorization type of "Basic Auth" and once you supply the username/password, you can press "Update Request" to generate the header that's needed.
Hi
Please try this:-
1. http://localhost:4502/system/console/configMgr
2. Search for 'Apache Sling Referrer Filter'
3. Remove POST method from the filter. Then you can call your POST method anywhere.
4. Select “Allow Empty”
I hope this would help you.
~kautuk
Views
Replies
Total Likes
Checkout this blog post I created with video instructions on how to prepare your REST Client to make posts requests to your AEM Author Instance - How to make a simple HTTP POST request to AEM with a HTTP Rest Client, Postman – Sourced Code
Views
Likes
Replies
Views
Like
Replies