Skip to content
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

SendsXml for Concurrently #31

Open
osroflo opened this issue Mar 1, 2022 · 1 comment
Open

SendsXml for Concurrently #31

osroflo opened this issue Mar 1, 2022 · 1 comment

Comments

@osroflo
Copy link

osroflo commented Mar 1, 2022

How can I implement SendsXml using Concurrently?

class AdequateShopRequest extends Request
{
    use SendsXml;
    protected string $method = 'POST';
    protected string $baseUrl = 'https://webservice.com';
    protected array $data = [];
}


$responses = Concurrently::build()->setRequests([
        AdequateShopRequest::build()->setPath('/something')->withXml($xml_body),
])->run();

Error: Typed property JustSteveKing\Transporter\Request::$request must not be accessed before initialization
../vendor/juststeveking/laravel-transporter/src/Concerns/SendsXml.php:17

Or if there is a way to set the contentType as property and just pass the body, something like this:

class AdequateShopRequest extends Request
{
    protected string $method = 'POST';
    protected string $baseUrl = 'https://webservice.com';
    protected string $contentType = 'application/xml';
}

$responses = Concurrently::build()->setRequests([
        AdequateShopRequest::build()->setPath('/something')->setBody($xml_body),
])->run();
@abbajbryant
Copy link

Should the SendsXml::send method include a call to ensuresRequest?

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

No branches or pull requests

2 participants