Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-24-2011, 08:43 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2011
Posts: 2
reliks is on a distinguished road
Exclamation need help with HTTP request using POST!!!

this is the thing I need to POST with IOS:

POST /oauth/token HTTP/1.1
Host: somewebsite.com
Authorization: Basic DIGEST_OF_YOUR_ID_AND_SECRET
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

grant_type=authorization_code&code=GENERATED_CODE


This one uses Basic Authorization/authentication that requires the digest of "client_id" and "secret" for which the values, for example, are "ABC" and "DEF" respectively.
As shown above, there are two parameters which are "grant_type" and "code".
Could anyone translate the HTTP request above into something that I can use for iOS? I would really appreciate it...
reliks is offline   Reply With Quote
Old 11-25-2011, 02:18 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 28
Mogglas is on a distinguished road
Default

Quote:
Originally Posted by reliks View Post
this is the thing I need to POST with IOS:

POST /oauth/token HTTP/1.1
Host: somewebsite.com
Authorization: Basic DIGEST_OF_YOUR_ID_AND_SECRET
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

grant_type=authorization_code&code=GENERATED_CODE


This one uses Basic Authorization/authentication that requires the digest of "client_id" and "secret" for which the values, for example, are "ABC" and "DEF" respectively.
As shown above, there are two parameters which are "grant_type" and "code".
Could anyone translate the HTTP request above into something that I can use for iOS? I would really appreciate it...
This is not a forum for requesting people to write code for you.

This looks like an easy to use lib for handling post and get requests. It is easy enough just using the NSURLConnection but if you feel this is easier, use this instead.
ASIHTTPRequest Documentation - All-Seeing Interactive
Mogglas is offline   Reply With Quote
Old 11-25-2011, 03:21 AM   #3 (permalink)
Registered Member
 
Join Date: Nov 2011
Posts: 2
reliks is on a distinguished road
Default i've tried that

Quote:
Originally Posted by Mogglas View Post
This is not a forum for requesting people to write code for you.

This looks like an easy to use lib for handling post and get requests. It is easy enough just using the NSURLConnection but if you feel this is easier, use this instead.
ASIHTTPRequest Documentation - All-Seeing Interactive
I've kept getting the error where it says GHUnitIOS/GHUnit.h not found error. I have clearly added that framework by clicking on the target tab and manually adding that. Do you know what the problem is? I've been trying to solve this for days but.... I could not.............. T.T
reliks is offline   Reply With Quote
Old 11-25-2011, 07:52 AM   #4 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 28
Mogglas is on a distinguished road
Default

Quote:
Originally Posted by reliks View Post
I've kept getting the error where it says GHUnitIOS/GHUnit.h not found error. I have clearly added that framework by clicking on the target tab and manually adding that. Do you know what the problem is? I've been trying to solve this for days but.... I could not.............. T.T
I'm sorry, i haven't go the time to check it out myself right now. :/
__________________
Games i've developed for iPhone so far:
Skycat and the StarchildrenRushing NinjasChicken Race
Mogglas is offline   Reply With Quote
Old 11-25-2011, 01:47 PM   #5 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

Quote:
Originally Posted by reliks View Post
I've kept getting the error where it says GHUnitIOS/GHUnit.h not found error. I have clearly added that framework by clicking on the target tab and manually adding that. Do you know what the problem is? I've been trying to solve this for days but.... I could not.............. T.T
For DAYS?? When did you start trying to use ASIHTTPRequest, and if you were having problems building it, why didn't your original post say so?

Anyway, it sounds like you are trying to build the sample ASI project. If so, it looks like you need to download GHUnit separately first.

But if you are trying to simply use ASIHTTPRequest in your own project, you don't actually need the sample app or GHUnit (although unit testing is always a good thing). The ASI website has great documentation on how to get started.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Reply

Bookmarks

Tags
authorization, basic, http, post, request

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 403
16 members and 387 guests
chiataytuday, Clouds, David-T, dedeys78, Duncan C, e2applets, EvilElf, iekei, ipodphone, leostc, LunarMoon, Murphy, QuantumDoja, sacha1996, Sami Gh, teebee74
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,127
Posts: 402,912
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:38 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0