Coder Social home page Coder Social logo

There is no response of status code in rest hooks i.e not able to get whether the post url is successfull or not about django-rest-hooks HOT 4 OPEN

zapier avatar zapier commented on August 30, 2024
There is no response of status code in rest hooks i.e not able to get whether the post url is successfull or not

from django-rest-hooks.

Comments (4)

avelis avatar avelis commented on August 30, 2024

@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.

from django-rest-hooks.

kartikey406 avatar kartikey406 commented on August 30, 2024

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?

from django-rest-hooks.

avelis avatar avelis commented on August 30, 2024

@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.

from django-rest-hooks.

kartikey406 avatar kartikey406 commented on August 30, 2024

@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.

from django-rest-hooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.