Answer the question
In order to leave comments, you need to log in
Django how to implement two different API serial connections?
A webhook in Django accepts messages from an API and should send a 200 OK code then create a new connection to another API and forward the messages.
@csrf_exempt
def comments(request):
if request.method == 'POST':
r = json.loads(request.body.decode('utf-8'))
requests.post('https://xxxxx.xxx', json=r)
return HttpResponse()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question