Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3548

SMP 3.0 SP 07 - Issue while post operation in iOS

$
0
0

Hi ,

 

We are on SMP 3.0 sp07 and are building an application that consumes oData services. We are able to retrieve data , but facing issues while create / post operation.

 

Below is the code for post operation :-

 

        [RequestBuildersetRequestType:HTTPRequestType];

       

        [RequestBuilderenableXCSRF:YES];

       

        id<Requesting> postRequest = [RequestBuilderrequestWithURL:[[NSURLalloc] initWithString:self.endpointURL]];

       

        [postRequest setRequestMethod:@"POST"];

       

        [postRequest addRequestHeader:@"aaaaa"value:@"xxxx"]; // Header value is passed here

       

        [postRequest setPostBody:postData]; //  post data is json converted from a nsdictionary

       

        [postRequest setDelegate:self];

       

        [postRequest startAsynchronous];


Operation works fine and is tested on rest client where we need to pass one request header and other data in payload.


I have passed the necessary headers and payload through my code as well. But the operation fails saying "Error 405 - Method not allowed"


What am i missing ?


Any inputs would be appreciated.


Thanks.


Viewing all articles
Browse latest Browse all 3548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>