Answer the question
In order to leave comments, you need to log in
When does a class return an object when it is created?
When does a class return an object when it is created?
as soon as we define a class through the new operator, the memory for the object is allocated, the constructor is called, and the constructor already returns the object? or is it returned later after methods are added to the object?
Answer the question
In order to leave comments, you need to log in
import json
data = {"query": "...", "variables": "..."}
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.post(url, data=json.dumps(data), headers=headers)
When it is completely ready, with methods. Although it would be better if you specified what language you are talking about, otherwise you never know, maybe there is some kind of exotic.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question