I’m trying to make a simple API with PHP and a way to retrieve data from it in JavaScript but I keep getting the following error: SyntaxError: Unexpected token < in JSON at position 0. The JSON is valid and I’m not sure what is causing the error… I’ve tried setting headers and the data is encoded with json_encode() so
Tag: rest
Suggestions on REST API & Software Architecture Style [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question First of all i am student, so i need to know how compounds Interact with each other, Maybe next time
What status code for ressource that may or may not exist on REST API
I am working on a one page web application for an online shop in Angular which will rely on a REST API handled by Symfony. One of the first request I make is that I need to know if the customer has an active cart or not. So I have a route /get-user-cart which returns null if the user has
Sorry, you are not allowed to create posts as this user using curl request php
i am using curl request to make post in wordpress site every thing were working fine from 2 years suddenly wordpress curl stop working. 1 i updated the htaccess to and try every possible solution but no luck 2 i install wp basic authentication but it does not work 3 i install jwt authentication plugin but no luck 4 i
Symfony 5 API populate related object entities
I am trying to create a simple web app using Symfony 5. I am using the API. Currently when calling some endpoint it only displays the IRI link to the related link: I need instead to display the …
Secure way for PHP REST api?
I am developing the PHP based REST api. I have android app which will send some key parameters to server and the server will respond with the data. In this case, the email is the key element to get all the relevant data. If I want to make it secure, I can save password in sharedPreferences and send it at
Fill custom CRM fields in Bitrix via REST API
I have the need to fill custom fields in Bitrix24 CRM via REST API. When it comes to working on standard fields (like TITLE, TEL, etc) it works, but if I try to valorize a custom field by putting it’s property name in the request the endpoint simply ignores it. Here you have a snippet: Did anyone have the same
PHP cURL GET Request to REST API not returning anything
I’m trying to use the UMLS Search REST API. I successfully retrieved the TGT and The ST. However, when trying to do a search as mentioned in the documentations, I got no response at all. Here’s my …
Is the sending of data to moodle REST API limited?
I’m using moodle 3.5, I’m trying to send an array of 2308 (user/corresponding cohort) to the external function ‘core_cohort_add_cohort_members’ by POST, the answer of the API is : array(3) { [“…
NCDC Web Services weather data with REST and PHP
I am trying to read precipitation data from the National Climatic Data Center’s online web services with PHP, but I can’t figure out how to read it. The documentation says that it is a RESTful web …