You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm now using gorequest lib to do some httptest in my code, and I found a problem that when I want to use makerequest with a Type method called before, It will always make a request with application/json content-type header, like the code below.
Then I check the source code in gorequest lib, I found that Type() method assigns multipart in a field of "ForceType" in the SuperAgent. But only "TargetType" is regarded in the MakeRequest() method. Only when use EndByte() method, the ForceType is assigned to the TargetType
For this case, I insert the code before MakeRequest() to solve this problem.
goreqObj.TargetType=goreqObj.ForceType
I'm wondering if it is a bug.
The text was updated successfully, but these errors were encountered:
I'm now using gorequest lib to do some httptest in my code, and I found a problem that when I want to use makerequest with a Type method called before, It will always make a request with application/json content-type header, like the code below.
Then I check the source code in gorequest lib, I found that Type() method assigns multipart in a field of "ForceType" in the SuperAgent. But only "TargetType" is regarded in the MakeRequest() method. Only when use EndByte() method, the ForceType is assigned to the TargetType
For this case, I insert the code before MakeRequest() to solve this problem.
I'm wondering if it is a bug.
The text was updated successfully, but these errors were encountered: