I want to made the put request and send JSON to my end point and get response. the issue is that I always receive 4xx errors.
Here is my target endpoint, the service endpoint is http://109.166.244.140:9763/webRS/services/user/validateCredentials with POST method. What am i doing wrong? How can i pass JSON and make the POST request? Thank you.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <TargetEndpoint name="default"> <Description/> <FaultRules/> <PreFlow name="PreFlow"> <Request> <Step> <Name>GetCredentials</Name> </Step> <Step> <Name>BasicAuthCredentials</Name> </Step> </Request> <Response/> </PreFlow> <Flows> <Flow name="userCredentials"> <Condition>(proxy.pathsuffix MatchesPath "/validateCredentials") and (request.verb = "POST")</Condition> <Description/> <Request/> <Response/> </Flow> </Flows> <PostFlow name="PostFlow"> <Request/> <Response/> </PostFlow> <HTTPTargetConnection> <Properties/> <URL>http://109.166.244.140:9763/webRS/services/user</URL> </HTTPTargetConnection> </TargetEndpoint>