Questions tagged [httppost]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
5k views

A testclass for @RestResource @HttpPost

I have a @HttpPost method in @RestResource class: @RestResource(urlMapping='/Something/*') global with sharing class HttpClass { @HttpPost global static String updateCustomObject() { //Fetching ...
0
votes
1answer
36 views

Modifying HTTP Call for Scheduler to Upload Dashboard Images

I have created the HTTP method using this post. But I'm unsure of how to test it out. Say if I run this in the Developer Console for testing how Can I link it to taking the image out of the Salesforce ...
1
vote
1answer
150 views

HTTP GET method Error

I'm trying to retrieve my VisualForce Page that I have already Render as a PDF using my Apex Class so I can store the page as a PDF inside the document folder. But, I keep on having an Error when ...
2
votes
1answer
797 views

REST SERVICE - Unexpected parameter encountered during deserialization

its all perfect! why is this happening? the same endpoint and JSON works in workbench but not in my java code: REST API : @RestResource(urlMapping='/RestTest/*') global with sharing class ...
0
votes
1answer
63 views

Serialized JSON for POST to server not taking

I am following this simple example List<Account> accounts = [SELECT id, name FROM Account LIMIT 2]; String accountsJSON = JSON.serializePretty(accounts); I am trying to replicate this exactly ...
3
votes
1answer
561 views

Multipart Post to Attachment

I am trying to send a binary file in Java to Salesforce '/sobject/Attachment' endpoint. Below is the code I am trying to use, but I keep receiving a 400 error. Any idea as to what the solution is? ...
9
votes
2answers
1k views

ID query string parameter call to RestResource results in error

I'm looking to set up a RestResource endpoint that accepts some URL parameters and creates a lead record. Here's the basic gist of my code: @RestResource(urlMapping='/createLead/*') global with ...
1
vote
1answer
784 views

insert mutlitple records using restapi apex

I hv 2 salesforce instances & I am inserting multiple account records from source to orgnz. The access token part is working , but I do not understand how to pass multiple account records. In ...

1
2