Skip to content

Conversation

byawitz
Copy link
Contributor

@byawitz byawitz commented Aug 14, 2024

What does this PR do?

Changes createExecution to send and parse multipart data

Code example 👇

<?php

use Appwrite\Client;
use Appwrite\Payload;
use Appwrite\Services\Functions;

$client = (new Client())
    ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
    ->setProject('&lt;YOUR_PROJECT_ID&gt;') // Your project ID
    ->setSession(''); // The user session to authenticate with

$functions = new Functions($client);

$result = $functions->createExecution(
    functionId: '<FUNCTION_ID>',
    body: Payload::fromJson([]), // optional
    async: false, // optional
    path: '<PATH>', // optional
    method: ExecutionMethod::GET(), // optional
    headers: '', // optional
    scheduledAt: '' // optional
);

Test Plan

image


public function toBinary(): string
{
return $this->data;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is binary represented as a string in PHP? is there no other data type like a buffer or uint8 array or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a string, yes

@byawitz byawitz changed the base branch from master to feat-multipart August 30, 2024 14:41
…ltiparts

# Conflicts:
#	mock-server/app/http.php
#	mock-server/src/Utopia/Response.php
#	tests/resources/spec.json
@christyjacob4 christyjacob4 merged commit f514c62 into feat-multipart Aug 30, 2024
7 of 34 checks passed
@christyjacob4 christyjacob4 deleted the feat-php-multiparts branch August 30, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants