www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - What happened to std.net.curl HTTP execute?

reply tastyminerals <tastyminerals gmail.com> writes:
I am using std.net.curl and the following chunk of code in many 
places:

"""
     http.setPostData(userData, "application/json");
     http.addRequestHeader("Accept", "application/json");
     http.addRequestHeader("Authorization", "BEARER " ~ 
clientAccessToken);
     auto jsonData = http.execute.parseJSON;
     if (jsonData.isNull) {
"""

Today I tried to compile one of the scripts and it failed with

  Error: no property execute for type std.net.curl.HTTP

When was it removed? I checked GitHub history briefly but the 
latest change dates back to April 2020 when these scripts were 
not even written. How did they work couple of months ago? I am 
confused.
Mar 17
parent tastyminerals <tastyminerals gmail.com> writes:
On Wednesday, 17 March 2021 at 16:02:58 UTC, tastyminerals wrote:
 I am using std.net.curl and the following chunk of code in many 
 places:

 """
     http.setPostData(userData, "application/json");
     http.addRequestHeader("Accept", "application/json");
     http.addRequestHeader("Authorization", "BEARER " ~ 
 clientAccessToken);
     auto jsonData = http.execute.parseJSON;
     if (jsonData.isNull) {
 """

 Today I tried to compile one of the scripts and it failed with

  Error: no property execute for type std.net.curl.HTTP

 When was it removed? I checked GitHub history briefly but the 
 latest change dates back to April 2020 when these scripts were 
 not even written. How did they work couple of months ago? I am 
 confused.
Ohh, I created a custom function "execute" which calls "HTTP.perform" :facepalm: I need to take a rest.
Mar 25