Skip to content

Commit 03f2f50

Browse files
committed
chore: changed accessibility of get and post data methods
1 parent fd1edea commit 03f2f50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Ealse.Growatt.Api/Ealse.Growatt.Api/Session.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ protected virtual async Task<string> PostMessageReturnResponse(Uri uri, HttpCont
179179
}
180180
}
181181

182-
private async Task<responseType> GetPostResponseData<responseType>(HttpContent content, Uri uri, string jsonPath)
182+
public async Task<responseType> GetPostResponseData<responseType>(HttpContent content, Uri uri, string jsonPath)
183183
{
184184
var response = await PostMessageReturnResponse(uri, content, HttpStatusCode.OK);
185185
var result = JsonSerializer.Deserialize<responseType>(response.GetPartOfJson(jsonPath));
186186

187187
return result == null ? throw new Exceptions.RequestFailedException(uri, new Exception("Deserialization error")) : result;
188188
}
189189

190-
private async Task<responseType> GetResponseData<responseType>(Uri uri, string jsonPath)
190+
public async Task<responseType> GetResponseData<responseType>(Uri uri, string jsonPath)
191191
{
192192
var response = await GetMessageReturnResponse(uri, HttpStatusCode.OK);
193193
var result = JsonSerializer.Deserialize<responseType>(response.GetPartOfJson(jsonPath));

0 commit comments

Comments
 (0)