HTTP Headers
|
|
Hey. What HTTP headers do I need to set? I know the “application” field (set to Application/XML). Would I need a “Method:” field, a “Username” field, and a “Password” field. This is causing me some problems within this little code… Jeremy |
|
|
Jeremy, I would strongly suggest referencing the Unfuddle API documentation. You will find a plethora of examples in a number of languages illustrating how to best interact with the Unfuddle API. The documentation is available at http://unfuddle.com/docs/api In general, however, you will typically need to set the following HTTP headers:
I hope that helps. Josh |
|
|
I actually did check the API first. Now my problem is the fact that none of the examples are remotely close to the language I am using which asks me for a field name and a value for that field. This is done before I send the request. |
|
|
Jeremy, From our previous conversations, I suspect you are looking for help accessing RESTful web services using Cocoa. Unfortunately, we do not do any Cocoa development over here, so I would just be Googling around like you for an answer. Perhaps someone out there could provide an example of accessing the Unfuddle API with Cocoa. Anyone? Josh |
|
|
You would be correct. The only way to create HTTP headers is through code that goes like this: NSMutableURLRequest setValue: Now if they are userpass, and “method” (post get ect.), I should be good. What does your end look for for authentication? But I will Google. |
|
|
Jeremy, The C# or JavaScript examples from the Unfuddle API docs have good examples of how to do HTTP Basic authentication. I suspect that it will be similar in Cocoa.
In general, authentication is performed by passing a header called “Authorization” with a value of (in pseudo code):
Good luck! |
|
|
Oh. It is called “Authorization”! That is so much easier. Now I need to figure out how to use the Get or Post or Delete methods. Let me try those. |
