on 07-30-2019 6:22 AM
Hi All,
i am developing one android application using odata proxy classes with sap cloud SDK i would like to use createEntityAsync method for create entity. How should i get response as json object?. How to use that method for create entity can you please suggest anyone how to do that?.
provider.createEntityAsync(entity, () -> {<br> <br>}, (RuntimeException re) -> {<br> <br>},httpHeaders);
I used like above for post request but first time i got exception status code 403 forbidden but second time i sent same request with same headers i got success can you please help me what's wrong with this.
I suggest enabling tracing at the HTTP layer (check OkHttp tracing options from SDK, or check with your server team) to find out why status 403 is returned the first time - perhaps the server wants a CSRF-Token?
The solution here won't be to get response of POST as JSON a object (the provider already does this and parses it when response status is 201) - the solution will be to determine cause of 403 through tracing and fix/avoid it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.