Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8021055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:51:46+00:00 2026-06-04T21:51:46+00:00

I have a certain URL http://dev.mycompany.com and I need to send some data (in

  • 0

I have a certain URL “http://dev.mycompany.com” and I need to send some data (in JSON format) to it and get the response.

I can’t find my way through the hugeload of documentation and related questions here on SO. I’ve managed to get the data (without sending any data) with NSURLConnection and it works good, the code I have so far is nearly the same as on https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html and so I don’t see any point of posting the code I have.

I can’t append some string to my URL as the data I need to send is JSON data. I am sorry if I sound like a noob, but I have very little experience in Obj-C and server communication.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:51:48+00:00Added an answer on June 4, 2026 at 9:51 pm

    You should send them as parameter to a post NSUrlRequest

    As following:

    NSURL *aUrl = [NSURL URLWithString:@"http://dev.mycompany.com"];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:aUrl
                                             cachePolicy:NSURLRequestUseProtocolCachePolicy
                                         timeoutInterval:60.0];
    [request setHTTPMethod:@"POST"];
    NSString *postString = @"yourVarialbes=yourvalues";
    [request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLConnection *connection= [[NSURLConnection alloc] initWithRequest:request 
                                                                 delegate:self];
    [connection start];
    

    For sending JSON
    Pelase read
    How to send json data in the Http request using NSURLRequest

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I want to do is make a get request to this URL: http://api.beatport.com/catalog/3/most-popular
I have certain data saved in the local storage. The same has been saved
I'm trying to post the entire asp.net form to a certain url. I have
I have a directory on a site: http://example.com/directory/ In it I have a .
I have a url which ends with a certain variable string, and was erroneously
I have a certain UI element, which when clicked should navigate to another URL.
URL is here: http://www.thexsoft.com/DownloadFolder/download.php?file=P2PTransfer This page is basically a way for me to have
Greetings fellow amazonians We have certain f4v files from webtvinteractive.com that are not working
I have a simple regular expression that matches some URL and it works fine
using Backbone.js we have an application, in which on a certain occasion we need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.