Skip to content

Tag: rest

Error when trying to get Instagram Embed page HTML code

I’m trying to get the HTML Code of the Instagram’s Embed pages for my API, but it returns me a strange error and I do not know what to do now, because I’m new to PHP. The code works on other websites. I tried it already on other websites like apple.com and the strange thing is that when I ca…

WordPress custom endpoint – rest_invalid_handler

I am completely new with PHP and WordPress, however I start to write my first plugin that should be able to expose a custom endpoint. I managed to register and activate the plugin and the route, but when I am trying to access this endpoint I am getting the following error: If I access the: http://localhost/my…

Decoding a gzipped string in PHP

I am trying to decode a gzipped body of a REST response (YouTrack-API) with PHP. Nothing seems to work: Automatic decoding from CURL does nothing Using Guzzle with headers set to accept encoding does nothing Simply putting the acquired string into gzdecode() does nothing I have tried gzinflate, gzdecode and s…

Prestashop – REST endpoints for my module

I’m developing Prestashop module, it will export customer data and orders, it will contain hooks for customer synchronization, cart and order events – generally module which will be an integration with CRM-like service. My module contains it’s own views, made in vue.js – single page, a…

Guzzle service description json array

How can I set parameter in Guzzle service description to be a json array? This is what I have tried but is not working: Call: The json correct json structure to be send is this: Answer You have to write nested definitions as per JSON schema validation rules. I had done this with XML based requests. Let me try…

Groups Annotations don’t works

Symfony 3.1.7 + FOSRestBundle latest version Then in my Article entity I added this annotation @Groups({“article”}) with the right use statement. Whit default serializer I get : Whit JMS serializer (bundle) I get : (I have two articles in db) it seems like the “article” group is not re…