As per http://developers.marketo.com/rest-api/error-codes/
We can convert a GET API to POST type by appending _method=GET in URL
Would this also be done to make API hits more secure ?, as POST request are more secure than GET
Also,
By using _method= GET in rest APIs , some times getting proper response.... while sometimes getting error array as.... [{message=name cannot be null., code=701}, {message=folder cannot be null., code=701}]
Do anybody came up with same case,
or
what would be probable reasons for it..?
It has nothing to do with security. It's about the request size. Large request payloads can't be managed in the URL.
Agreed
but By using _method= GET in rest APIs , some times getting proper response.... while sometimes getting error array as.... [{message=name cannot be null., code=701}, {message=folder cannot be null., code=701}].... not getting the reason...
Well, I'd have to see the payloads and that you're using proper encoding. Not sure if every single Marketo GET can be used with _GET.
For example, for getting static list
GET https://######.mktorest.com/rest/asset/v1/staticLists.json?access_token=######## -> working fine and getting all static list
but, for
POST https://######.mktorest.com/rest/asset/v1/staticLists.json?_method=GET with access token passed in request in x-www-form-urlencoded
This was working earlier, but now it giving error = [{message=name cannot be null., code=701}, {message=folder cannot be null., code=701}]
Not getting the reason, why this is happening
Please show the full payload, and use the Advanced Editor's syntax highlighter so it's readable.
POSTMAN's screen shots
-> My GET request
-> My POST request
I require the request payload and headers to be pasted as plain text and syntax-highlighted for readability. Not gonna work w/screenshots.