Whenever we have to call an external link(URL) and get any sort of data from that, we might came across the need to create a http request object and setting up some params for that. So following is the example for doing that in Django.
from django.http import HttpRequest
request = HttpRequest()
request.method = 'GET'
request.user = user
request.GET.update({"thread_id": thread.id})