setJsonBody() multiple array issues
Closed this issue · 3 comments
gitaccxz commented
Its PATCH
request.
This is my json post data
{"user": {"profile_attributes": {"one_liner": "'.$title.'"}}}
i am trying like this but not working:
$request->setJsonBody(["user" => ["profile_attributes" => ["one_liner" => $title]]]);
hightman commented
see https://github.com/hightman/httpclient/blob/dcc4f476f7c20dd445df43a4f6988227a841a909/src/Request.php#L209
now only PUT and POST requests has body data.
… 在 2021年11月6日,23:21,gitaccxz ***@***.***> 写道:
This is my json post data
{"user": {"profile_attributes": {"one_liner": "'.$title.'"}}}
i am trying like this but not working:
$request->setJsonBody(['user' => ['profile_attributes' => ['one_liner' => $title]]]);
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
gitaccxz commented
No PATCH request data. Plz add it
gitaccxz commented
i added it. Thanks