App crashing with Segmentation fault: 11

3 posts, 1 answers
  1. Akhil
    Akhil avatar
    4 posts
    Member since:
    Jan 2015

    Posted 15 Jan 2015 Link to this post

    Hey everyone,

    I'm trying to develop my first mobile app with NativeScript and am encountering an issue when trying to do an HTTP post request - the only messages I am seeing in XCode are "failed with error(4: ios/kern) invalid argument)" and "service exited due to signal: Segmentation fault: 11." Looking these up on Google didn't really help.

    The code for my post request is as follows (I am trying to send an email using PostMark). Any help would be greatly appreciated!

        http.request({ 
            url: "https://api.postmarkapp.com/email", 
            method: "POST",
            content: {
                "From": **My email**,
                "To": **Recipient**,
                "Subject": "Test",
                "HtmlBody": "<b>Hello!</b>",
                "TextBody": "Hello",
                "Headers": [
                    {
                        "Name": "X-Postmark-Server-Token",
                        "Value": **API Token**
                    }
                ]
            }
        }).then(function(response) {

        }, function(error) {
            console.log(error);
        });
  2. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 16 Jan 2015 Link to this post

    Hi,

    Please use JSON.stringify() to post JSON content. You can check this thread for more info:
    http://www.telerik.com/community/forums/http-module-issue-on-ios

    Regards,
    Vlad
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Akhil
    Akhil avatar
    4 posts
    Member since:
    Jan 2015

    Posted 16 Jan 2015 in reply to Vlad Link to this post

    This worked, thanks so much!
Back to Top