Why is it that “No HTTP resource was found that matches the request URI” here?

Your problems have nothing to do with POST/GET but only with how you specify parameters in RouteAttribute. To ensure this, I added support for both verbs in my samples. Let’s go back to two very simple working examples. [Route(“api/deliveryitems/{anyString}”)] [HttpGet, HttpPost] public HttpResponseMessage GetDeliveryItemsOne(string anyString) { return Request.CreateResponse<string>(HttpStatusCode.OK, anyString); } And [Route(“api/deliveryitems”)] [HttpGet, HttpPost] public … Read more

How can I pass parameters from the command line to $_POST in a PHP script?

Just insert the following lines at the beginning of your script: /* If started from the command line, wrap parameters to $_POST and $_GET */ if (!isset($_SERVER[“HTTP_HOST”])) { parse_str($argv[1], $_GET); parse_str($argv[1], $_POST); } This small piece of code does the trick (you may decide if you want to use $_GET or $_POST or, like I … Read more

POST multipart/form-data with Objective-C

The process is as follows: Create dictionary with the userName, userEmail, and userPassword parameters. NSDictionary *params = @{@”userName” : @”rob”, @”userEmail” : @”[email protected]”, @”userPassword” : @”password”}; Determine the path for the image: NSString *path = [[NSBundle mainBundle] pathForResource:@”avatar” ofType:@”png”]; Create the request: NSString *boundary = [self generateBoundaryString]; // configure the request NSMutableURLRequest *request = [[NSMutableURLRequest … Read more