Can someone please point me in the right direction?
I am looking to call “eth_newFilter” using PHP (laravel).
I keep getting “invalid json request” even though I think I am sending the correct data.
Note: Laravel does send content type “application/json” as default.
Please see attached.
Hi @rocketvalley, and welcome to the Infura community!
This seems like a very trivial thing, but what happens if you switch your single quotes to double quotes? JSON requires double quotes, so I’m thinking this may be a syntax issue (versus a data sent issue)
Thank you for your reply. I did think of this, however, quotes are not the cause. I am using Laravel and it will automatically convert the data to json.
If I intercept the request, here is actually what Laravel is sending:
Any help would be greatly appreciated, my friend send the exact same JSON to the endpoint using python and it worked fine.
For example, if I send this…
Thanks for providing the additional information! I’m not the most familiar with PHP/Laravel, but I’ll see if I can help you figure out what’s going on! I know that Laravel sends content type “application/json” as default, but have you tried to explicitly state it?
If that doesn’t work, can you please copy the full error message for me to see if that helps guide me on where to look?