Skip to content

ApiException : phpish\shopify\ApiException: [414] #48

@sandeeppangeni

Description

@sandeeppangeni

`$get_template = $shopify("GET /admin/api/".$apiversion."/themes/$theme_ids/assets.json?asset[key]=snippets/card-product.liquid&theme_id=$theme_ids");
$value_data = trim($get_template['value']);
$findstring = "

Test
";
$updatedval = $value_data. $findstring;
$updatetemplate = array(
'asset' => array(
"key" => "snippets/card-product.liquid",
"value" => "$updatedval"
)
);

try{
$templateupdate = $shopify("PUT /admin/api/".$apiversion."/themes/$theme_ids/assets.json", $updatetemplate);
}
catch (shopify\ApiException $e) {
error_log($e);
}
`
On put request , phpish\shopify\ApiException: [414] error.

Is there any way to fix this ? I have tried to add Content-Length on the request header too. But the issue not resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions