Hi,
I am a new Objective-C Developer with mild C and Delphi experience. I am finding it hard to adapt to Objective-C. I can see the benefits, but I am still getting my head around the syntax.
I have what I consider a really simple app to write but I can not for the life of me work out how to do it! Can anyone help?
I believe I need to use NSUrl somehow.
The requirement;
I need to send an XML request to a specific url and do a http get, then write the results to a file. An example request and result is shown below.
An example request would be:
<request method="[method name]">
<!-- method arguments -->
</request>
I expect a successful response like;
<response status="ok">
<!-- return value(s) here] -->
</response>
I need to write the returned values to a file.
Unsucessful response like;
<response status="fail">
<error> ... </error>
</response>
I need to display the error message to NSLog.
I can use curl to get the response using the following command;
curl -u insert_token_here:X https://mydomain.com/xmlrequest -d '[xml body here]
Thanks in advance. Comments would be great to I can learn from your response.
Regards,
Luke.
I am a new Objective-C Developer with mild C and Delphi experience. I am finding it hard to adapt to Objective-C. I can see the benefits, but I am still getting my head around the syntax.
I have what I consider a really simple app to write but I can not for the life of me work out how to do it! Can anyone help?
I believe I need to use NSUrl somehow.
The requirement;
I need to send an XML request to a specific url and do a http get, then write the results to a file. An example request and result is shown below.
An example request would be:
<request method="[method name]">
<!-- method arguments -->
</request>
I expect a successful response like;
<response status="ok">
<!-- return value(s) here] -->
</response>
I need to write the returned values to a file.
Unsucessful response like;
<response status="fail">
<error> ... </error>
</response>
I need to display the error message to NSLog.
I can use curl to get the response using the following command;
curl -u insert_token_here:X https://mydomain.com/xmlrequest -d '[xml body here]
Thanks in advance. Comments would be great to I can learn from your response.
Regards,
Luke.