How to post a submission in swift

  • Profile Image
    Asked on March 14, 2018 at 03:20 PM

    My arguments never get passed through to fill the form questions. Can you see anything I am doing wrong?

    let url = URL(string: "\(Constant.jotformFormId)/submissions?apiKey=\(Constant.jotformApiKey)")!

        var request = URLRequest(url: url)

        request.httpMethod = "POST"

        let postString = "submission[0]=answer1&submission[1]=answer2"

        request.httpBody = .utf8)

  • Profile Image
    Answered on March 14, 2018 at 04:20 PM

    I'm not really familiar with swift programming but these articles may help you.



    Hope this information helps.

    Please let us know if we can be of further assistance.