swift - Http request on iOS app starting -


I want to send http request to myapp-start how to do this? I try:

class MainViewController: UITableViewController {func my_request () {url = NSURL (string: "http://www.stackoverflow.com") Request = NSURLRequest (URL: Url ()) / Lg = my_request ()}

But I have an error: Missing argument for parameter # 1 in call < P> How to fix it?

Thank you!

my_request () returns nothing, if you want to call function, only

  my_request ()   

I suggest keeping it in the ViewDidLoad function (on your app's main view controller)

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -