Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

There is no response of status code in rest hooks i.e not able to get whether the post url is successfull or not #38

Open
kartikey406 opened this issue Sep 20, 2016 · 4 comments

Comments

@kartikey406
Copy link

No description provided.

@avelis
Copy link
Contributor

avelis commented Sep 20, 2016

@kartikey406 If you look at the DeliverHook class in the readme , you should see an example of a post being made. The code is a reference point. You can modify the example to capture the response into a variable and output or store the status code however you see fit.

@kartikey406
Copy link
Author

But thats the example of using celery.what about if i don't want to use celery ..then it return None. yeah we can return status_code instead of none.Can i change it send u a pull request?

@avelis
Copy link
Contributor

avelis commented Sep 21, 2016

@kartikey406 You are welcome add a non Celery example alongside the Celery example. I can take a look at a pull request if you make one.

For general guidance: Take a look at the deliver_hook_wrapper method. You can call another function of your own implementation to return the status code once you make the request.

@kartikey406
Copy link
Author

@avelis Hi ,Thanks for it.I have gone through the code .As you are saying that deliver_hook_wraper can be customize to use deliver hook wraper we need to add it's deliver path in settings.py of django.But what about when one is using the default options of django-rest-hooks such as model events or any customize events without using deliver hook wrapper .In that case there is no return status code. So what i meant to say let's incorporate all these features to make django-rest-hooks more easy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants