Ich habe zu senden Post-Anforderung in httparty und bekommen Antwort meine Json params sindWie json params in Httparty
{
"webhook": {
"topic": "shop/update",
"address": "http://2350d6c0.ngrok.io/shopify_stores/update_shop_info",
"format": "json"
}
}
Und ich bin mit httparty params als
begin
response = HTTParty.post("#{url}",
{
:body => [
{
"webhook" => {
"topic" => "shop\/update",
"address" => "http:\/\/15ec3a12.ngrok.io\/shopify_stores\/update_shop_info", #place your url here
"format" => "json"
}
}
].to_json,
:headers => { 'Content-Type' => 'application/json', 'Accept' => 'application/json'}
})
byebug
rescue HTTParty::Error
end
aber es bauen repsonse ist
Erforderliche Parameter fehlen oder sind ungültig
Ok. Gibt es einen Teil des Controllers, in dem 'def something_params' steht, unter' private'? Wenn ja, kannst du das in deine Frage stellen? –
Ich benutze sie nicht nur senden Sie eine Post-Anfrage an den Server und Speichern der Antwort –