Question

I am new to iPhone programming and would like to be able to use the BLAST (is a bioinformatics server) URL's API from the iPhone. I would like to write a very simple application that queries the BLAST server and make some query. I have found the following I have found the following documentation on BLAST (http://www.ncbi.nlm.nih.gov/BLAST/Doc/urlapi.pdf).

I am not sure from where I should start.. I checked out the following on security concepts for Mac OS X and iOS(http://developer.apple.com/iphone/library/documentation/Security/Conceptual/Security_Overview/Concepts/Concepts.html) and then found CFNetwork library (http://developer.apple.com/iphone/library/documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html).

But I don't really know from where to start..

theoretically I would like to query the BLAST url API from a .mm class method (so I can use standard C) and then show the results in a normal view.

Anyone would be able to guide me in these first steps?

Best regards and Many thanks!

Was it helpful?

Solution

The BLAST API is strange. It is a POST-only command-response API, but the commands you POST are things like CMD=Get&..., CMD=Put&..., etc.

The iPhone SDK provides a fairly convenient high level way to invoke URLs. Have a good read of the NSURLRequest documentation. You'll need to set the HTTPMethod property to POST, and populate the HTTPBody with whatever the BLAST API tells you to post.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top