Skip to main content

Posts

Showing posts with the label cfhttp

Coldfusion: Custom cfhttp tag

I was trying to invoke the below URL: https://api.linkedin.com/v1/people/~:(id,first-name,last-name,industry,skills)?oauth2_access_token=blabla When I make the call directly from the browser it works fine, but if I call it using  cfhttp  request I got 404 Not Found error. The issue is most likely related to url encoding, kindly advise how send the request using cfhttp or another method without being enforced to be urlencoded, I have replaced the cfhttp tag with the custom cf_http method as below: Coldfusion: Custom cfhttp tag : Annoyed by the limitations of the default cfhttp tag i have written a custom cf_http tag that overcomes some of the limitations. Well any co...

Basic Authorization with Coldfusion

When trying to access a webservice or a rest api you might need authorization, this can be done simply by sending the username and password throw the cfhttp as the below: The respond you might receive is as below: 200  - OK - Everything went fine. 400s - all caused by user interaction 400  - Bad Request - The request was malformed or the data supplied by the end user was not valid. This is also used if the user has exceeded their API usage limit. 401  - Unauthorized - The user is not authorized to access the requested resource. Additional information is typically supplied within the response to tell the end user (API consumer) how to authorize itself (ie. BASIC Authentication). 403  - Forbidden - The user has exceeded their post limit (not bloody likely). 404  - Not Found - The requested resource was not found. 405  - Method Not Allowed - The user attempted to use a verb (ex. GET, POST) on a resource that had no support for the given verb. 406...