thanks but that doesn’t make a difference and works with all my put and delete requests with that header. I am not sure if i am passing my parameters correctly and have seen people use the setRawbody but i can’t get that to work either.
Thanks again for trying to help though. good to see some life here
froschdesign, thanks for the help. your first example gives me the same invalid content type and the second example give me the validation failed name is null.
Please keep in mind: We know nothing and see nothing of your application. Therefore it is difficult to say where the error comes from and what the problem is.
At the moment we only see that you want to send data via POST. We do not see anything from the recipient. Therefore you should also check the other side.
Another option: use your IDE to create the HTTP request and check the results.
I can create the request fine using postman or curl but I would like my app to be clean and use laminas\Http for all of the requests. I am calling a standard rest service from api-tools.
It’s quite confusing. I think you should recheck if the content type application/x-www-form-urlencoded is correct and needed here. Or some different content type must be used.
yes I do. I did more testing with this earlier and using the examples in the Laminas http documentation didn’t send the post data like their example showed.
Check the content type you are passing to the request. You can use postman to first check what content type the API request first before you make a request to it.
If you don’t know how, this man has a postman tutorial that can help you.