Laravel Does not send data | Community
Skip to main content

Laravel Does not send data

  • February 9, 2022
  • 3 replies
  • 0 views

Aram

GuzzleHttp\Exception\ConnectException

cURL error 6: Could not resolve host: https (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://https//testingcomphelp.zendesk.com.zendesk.com:443/api/v2/tickets.json

3 replies

Guided
  • February 9, 2022

Hey Aram Ghazaryan,

Not sure what you're trying to do there, but it makes sense that the host could not be resolved:

  1. The protocol seems to be double (missing colon); https://https// 
  2. Double zendesk domain; zendesk.com.zendesk.com

Aram
  • Author
  • February 11, 2022

He Sebastiaan

 

Thanks for the feedback

I want to create a ticket, unfortunately this problem occurred

I use php << Laravel Framwork >>

This is the code I wrote ՝

$subdomain = "https://testingcomphelp.zendesk.com";
$username = "a480011@mail.ru"; // replace this with your registered email
$token = "XXXPPHJJKKL"; // replace this with your token


// Create a new ticket
$newTicket = $client->tickets()->create([
'subject' => 'The quick brown fox jumps over the lazy dog',
'comment' => [
'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
],
'priority' => 'normal'
]);
print_r($newTicket);

Guided
  • February 14, 2022

Hey Aram,

Can you try to change this:

$subdomain = "https://testingcomphelp.zendesk.com";

Into this:

$subdomain = "testingcomphelp";

And see what happens?