Skip to content

fix ParseCloudFunction execute and executeObjectFunction headers fail #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/src/objects/parse_function.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class ParseCloudFunction extends ParseObject {
///
/// To add the parameters, create an object and call [set](value to set)
Future<ParseResponse> execute(
{Map<String, dynamic> parameters, Map<String, dynamic> headers}) async {
{Map<String, dynamic> parameters, Map<String, String> headers}) async {
final String uri = '${_client.data.serverUrl}$_path';
if (parameters != null) {
_setObjectData(parameters);
}

final Response result =
await _client.post(uri, body: json.encode(_getObjectData()));
final Response result = await _client.post(uri,
headers: headers, body: json.encode(_getObjectData()));
return handleResponse<ParseCloudFunction>(
this, result, ParseApiRQ.execute, _debug, parseClassName);
}
Expand All @@ -43,14 +43,14 @@ class ParseCloudFunction extends ParseObject {
///
/// To add the parameters, create an object and call [set](value to set)
Future<ParseResponse> executeObjectFunction<T extends ParseObject>(
{Map<String, dynamic> parameters, Map<String, dynamic> headers}) async {
{Map<String, dynamic> parameters, Map<String, String> headers}) async {
final String uri = '${_client.data.serverUrl}$_path';
if (parameters != null) {
_setObjectData(parameters);
}
final Response result =
await _client.post(uri, body: json.encode(_getObjectData()));
return handleResponse<T>(
this, result, ParseApiRQ.executeObjectionFunction, _debug, parseClassName);
final Response result = await _client.post(uri,
headers: headers, body: json.encode(_getObjectData()));
return handleResponse<T>(this, result, ParseApiRQ.executeObjectionFunction,
_debug, parseClassName);
}
}