Skip to content

Tag: rest

How to validate a sale with PayPal REST API and IPN

I currently have a fully working cart and checkout process through PayPal _xcart method, but I want to migrate it to REST API, mainly because I want to mitigate the possibility of price-jacking. Currently my IPN does check for price jack and sets the according flags so the product doesn’t get downloaded…

How to pass custom header to RESTful call?

There are some web service APIs that I need to connect to for my website. Most of the APIs involve something like this: But one web service requires the API key to be set in a custom HTTP header. How do I make the request to this API url and pass the custom header at the same time? Answer You

Call a REST API in PHP

Our client had given me a REST API to which I need to make a PHP call. But as a matter of fact, the documentation given with the API is very limited, so I don’t really know how to call the service. I’ve tried to Google it, but the only thing that came up was an already expired Yahoo! tutorial

PHP multipart form data PUT request?

I’m writing a RESTful API. I’m having trouble with uploading images using the different verbs. Consider: I have an object which can be created/modified/deleted/viewed via a post/put/delete/get request to a URL. The request is multi part form when there is a file to upload, or application/xml when …

RESTful API methods; HEAD & OPTIONS

I’m writing a RESTful API module for an application in PHP, and I’m a bit mixed on the verbs HEAD and OPTIONS. OPTIONS  Used to retrieve the available HTTP verbs for a given resource? HEAD Used to determine whether a given resource is available? If someone could clarify* these verbs, that would be…