doing NSURLRequest and pass value through form-variable - cocoa

i would like to do a HTTP POST method to communicate with an ASPX page.
I will need to pass the value through form-variable.
how can i achieve it on objective-c?

http://www.cimgf.com/2010/02/12/accessing-the-cloud-from-cocoa-touch/
This was the first entry on Google. Please search Google prior to asking questions here :)

Related

Typo3 - Create pages and content elements programmatically through Ajax/Front-End

Is there a way to create new pages or content elements programmatically through Ajax from a headless front-end?
I'm just trying to understand Typo3 possibilities and limits.
Yes you can. You will have to use Middlewares (TYPO3 >= 9).
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/RequestHandling/Index.html
Basically you register your Middleware and then you evaluate what you want to do. For example you can set a GET or POST parameter with a key & a value
that look like this: ?object=article and according to what you want to do, you call the class that handles the data. After that, you can return a json response and you are solid.
Hope it helped,
Best regards

How to do Partial Response with Google URL Shortener API

Looking at the documentation on this API there is a page on performance to cut back the number of keys in the JSON dictionary returned. URL Shortener Performance Tips
Of the three dictionary keys returned in the insert request of this API, I am only interested in the shortened URL. The id key. Looking at the above documentation I would have expected this to work:
The POST request https://www.googleapis.com/urlshortener/v1/url?fields=id?key=YOUR-API-KEY
But with the fields=id added the request comes back invalid.
How do you set only a partial response for this API to only return the id key?
Turns out the comment from abraham steered me in the right direction on this problem. I was able to find the Try it tool option without OAuth and it worked also to my surprise. Looking at the request it generated I found that it was a syntax error on my part looking at the url given in my original question. It should be:
?fields=id&
not
?fields=id?

magento How can I set a url request like this? 'baseurl/frontname/index.php?/param'

I need to make an action method that will receive a parameter in the url, perform a search and return an array. Anyway, that's not the problem. My problem is that I want a url like 'baseurl/frontname/param'. I don't know how to do this. I've already seem a Magento site performimg same operation with a url like 'baseurl/frontname/index.php?/param'. It's good for me too.
Can someone help me to realize it?

How do I parse a POST to my Rails 3.1 server manually?

Scenario:
I have a Board model in my Rails server side, and an Android device is trying to post some content to a specific board via a POST. Finally, the server needs to send back a response to the Android device.
How do I parse the POST manually (or do I need to)? I am not sure how to handle this kind of external request. I looked into Metal, Middleware, HttpParty; but none of them seems to fit what I am trying to do. The reason I want to parse it manually is because some of the information I want will not be part of the parameters.
Does anyone know a way to approach this problem?
I am also thinking about using SSL later on, how might this affect the problem?
Thank you in advance!! :)
I was trying to make a cross-domain request from ie9 to my rails app, and I needed to parse the body of a POST manually because ie9's XDR object restricts the contentType that we can send to text/plain, rather than application/x-www-urlencoded (see this post). Originally I had just been using the params hash provided by the controller, but once I restricted the contentType and dataType in my ajax request, that hash no longer contained the right information.
Following the URL in the comment above (link), I learned the how to recover that information. The author mentions that in a rails controller we always have access to a request variable that gives us an instance of the ActionDispatch::Request object. I tried to use request.query_string to get at the request body, but that just returned an empty string. A bit of snooping in the API, though, uncovered the raw_post method. That method returned exactly what I needed!
To "parse it manually" you could iterate over the string returned by request.raw_post and do whatever you want, but I don't recommend it. I used Rack::Utils.parse_nested_query, as suggested in Arthur Gunn's answer to this question, to parse the raw_post into a hash. Once it is in hash form, you can shove whatever else you need in there, and then merge it with the params hash. Doing this meant I didn't have to change much else in my controller!
params.merge!(Rack::Utils.parse_nested_query(request.raw_post))
Hope that helps someone!
Not sure exactly what you mean by "manually", posts are normally handled by the "create" or "update" methods in the controller. Check out the controller for your Board model, and you can add code to the appropriate method. You can access the params with the params hash.
You should be more specific about what you are trying to do. :)

Saving data using ajax: sending large text in querystring is good or bad?

I want to add a comment feature in my ASP.NET website that is similar in stackoverflow.com. Here the entire page is not getting posted, instead ajax is being used i hope.How does the value entered inside the textarea is passed to the server page ? as querystring for an ajax get/post call ? .I believe its not a good idea to do so when the content of the text area (text ) is large in size . How can i pass special characters ?
Whats is the best method to do this ? Please advice
Your instincts are correct. You should only use QueryString for small things like ID's. Use GET and POST for passing larger amounts of data.
IE has a size limitation for get requests. This document is a good guide for choosing when to use get or post.

Resources