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 9189925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:20:41+00:00 2026-06-17T20:20:41+00:00

In this app someone has built for me has used this code in order

  • 0

In this app someone has built for me has used this code in order to parse a json array:

ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/lending.php?category_id=1",host_name ]]];
[request setRequestMethod:@"GET"];

It works fine, now, what I need is instead of the lendig.php I need to insert this array, which is in fact the output of the json array:

[{"name":"Ekspres Kredi","category_id":"1","id":"2"},{"name":"Kredi p\u00ebr Pushime ","category_id":"1","id":"4"},{"name":" Kredi Konsumuese ","category_id":"1","id":"5"},{"name":"Auto Kredi ","category_id":"1","id":"6"}]

How can I insert that instead?

It should be something like:

ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"[{"name":"Ekspres Kredi","category_id":"1","id":"2"},{"name":"Kredi p\u00ebr Pushime ","category_id":"1","id":"4"},{"name":" Kredi Konsumuese ","category_id":"1","id":"5"},{"name":"Auto Kredi ","category_id":"1","id":"6"}]",host_name ]]];
[request setRequestMethod:@"GET"];
  • 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-17T20:20:42+00:00Added an answer on June 17, 2026 at 8:20 pm

    First of all you should have clear what you want to do. Anyway here I’m suppose that you want to send some data to a server, in this case you use a POST request.

    NSString *jsonString = @"{\"name\":\"Ekspres Kredi\",\"category_id\":\"1\",\"id\":\"2\"},{\"name\":\"Kredi p\u00ebr Pushime \",\"category_id\":\"1\",\"id\":\"4\"},{\"name\":\" Kredi Konsumuese \",\"category_id\":\"1\",\"id\":\"5\"},{\"name\":\"Auto Kredi \",\"category_id\":\"1\",\"id\":\"6\"}"
    
    
    NSURL *url = [NSURL URLWithString:@"http://myserver.com/post.php"];
    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
    [request addRequestHeader:@"Content-Type" value:@"application/json"];
    [request appendPostData:[jsonString  dataUsingEncoding:NSUTF8StringEncoding]]; 
    [request startAsynchronous];
    

    By setting the body of the request the method used will be POST.

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

Sidebar

Related Questions

I am asking this here in the hope that someone has maybe come across
I have an app built that stores users' fbids. Client has asked to send
I really hope someone can shed some light on this problem, I have built
This app displays a form with a textbox where the user is supposed to
This app I completed around a year ago (!) but never launched it on
In this app I want that as I click on button the data from
I am writing this app in windows form c#. When user exit from this
When the users of this app make changes to the fields a large amount
So I have this app which needs to query entities from the Azure Tables
So I have this App in the store, and I would like to release

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.