graw icon indicating copy to clipboard operation
graw copied to clipboard

add Http.reponse& add api type json

Open tarekbadrsh opened this issue 7 years ago • 3 comments

  • we need to know how reddit response for every request ; so i add *http.Response in return value and user need to call body.close()

  • added "api_type": "json" as type of response

  • i can make an example how to use if you think it's good idea please feel free to ask .

thanks

tarekbadrsh avatar Sep 11 '18 11:09 tarekbadrsh

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 11 '18 11:09 CLAassistant

This change would break users so we can't do it this way. It would also make users responsible for closing the response descriptors. In what situations do you need to know the content of non-error responses?

turnage avatar Sep 30 '18 18:09 turnage

  • I was need the whole response result (postid, etc ...).
  • you are right in the issue about user close the connection we can solve by return (struct type with define property or byte array )
  • we can let the currant interface as it's and create another return response

please feel free to ask about update and i will.

tarekbadrsh avatar Sep 30 '18 21:09 tarekbadrsh