Questions tagged [httprequest]

httprequest is the request sent by browser to server for particular resource.

Filter by
Sorted by
Tagged with
0
votes
2answers
25 views

What is Salesforce Daily api limit per user per 24 hours?

According to Salesforce Documentation, Salesforce Unlimited editions have a limit of 5,000 API calls Per License Type, per 24 hours and the total API calls per 24 hours are: 100,000 + (number of ...
0
votes
1answer
23 views

add custom headers for my custom Soap Apex webservice

i created below custom Apex Soap Webservice then i am able to get wsdl and shared to client for call SF, but i want to add some custom headers to my apex soap webservice, so that client must be add ...
0
votes
0answers
24 views

How to Store HTTP Request Code in separate class for Reusability? [duplicate]

We have JSON HTTP Post request that triggers from one salesforce object to external system and we want to extend this functionality for other object. This code Fires and creates a Record in external ...
0
votes
0answers
32 views

How to change Marketing Cloud Http Request timeout?

Is there a way to change MC Http Request timeout? I think that the default is 30 seconds, but the process we are POSTing to via a form can take more. I'm using SSJS for the call: var result = HTTP....
0
votes
0answers
14 views

403 error on callout to service ran locally [duplicate]

I have a service I'm running in a docker container locally, listening in port 8000. The service is non http secured. I'm trying to send a GET request from my apex code to the service and getting an ...
0
votes
0answers
38 views

Problem with Apex HTTP callout POST Test [duplicate]

I get the following error: "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out" when executing my test. The code coverage is already at ...
0
votes
1answer
35 views

Problem with testing void HttpRequest

I can only get 23% code coverage with what I have. The http request in the method is not getting covered for some reason.. Here's what I've tried: Class: public class PostClientes { @...
0
votes
0answers
22 views

Is it possible to get content of a file from downloadable URL? [duplicate]

I am trying to send email with attachments. My goal is to get the content of a file from downloadable URL, then build the attachment for sending email. There is a standard solution provided by ...
2
votes
1answer
28 views

HttpPost method test will not run: Method does not exist or incorrect signature: void doPost() from the type MyOriginalClass

I have a test like below. and the error: Method does not exist or incorrect signature: void doPost() from the type MyOriginalClass In MyOriginalClass, the method has parameter like doPost(String url) ...
0
votes
1answer
32 views

Httprequest doesn't work in batch although Database.AllowsCallouts implemented

We are planning to start new integration functionality to a new system in our landscape (Workday). To do this we created integrations in apex with httpcallouts. We are planning to start the initial ...
0
votes
1answer
62 views

Apex, HttpRequest, Named Credentials

i have to make an httpRequest with apex to an external site. Problem: I have to securely store an API Key somewhere in salesforce so that it's possible to use in apex The header of the request must ...
0
votes
1answer
24 views

Error Invalid Conversion from runtime JSON to APEX

I am getting an error while converting the response from JSON to Apex class. Invalid conversion from runtime type MapAPIDemo.resourceSets to List<MapAPIDemo.resourceSets> Here is the code below ...
0
votes
1answer
34 views

http callout `Client credentials are missing` by using Basic Auth

I am trying to get the access token by calling PayPal API,I Am getting Client credentials are missing response. public static HttpResponse GetAccessToken() { Http http = new Http(); ...
3
votes
0answers
57 views

Executing multiple callouts from a future method

I have a problem when I try to execute multiple callout from a method of an Apex Class. The method code is the following: @future(callout=true) public static HttpResponse makeCallout(){ List<...
1
vote
1answer
44 views

Charset is set incorrectly to us-ascii instead of utf-8 when sending email from Marketing Cloud

We have an issue where an email sent from a journey is rendered with '????????' instead of Hebrew letters. We examine the mime code header (within the .eml file) and found this: Content-Type: text/...
0
votes
1answer
55 views

Bulkify trigger to future Callouts

I asked another question on the future callouts which was throwing the SystemLimitException, the recommendation was to use the Queable or making the future Callouts bulkified from the trigger. I tried ...
0
votes
1answer
65 views

Future Callout Throws: System.LimitException: Too many future calls: 51 [duplicate]

I am trying to call the external API endpoint from Salesforce when an account is created. I created a trigger on the Account which looks like below trigger createSegSubSegmentD on Account (after ...
0
votes
1answer
74 views

Apex rest service issue with HTTP Post method when i Access from Postman

i created Apex rest service and @HttpPost method , i am able call POST method & got data in request body successfully from workbench. but i had issue with when i try to access from Post man. i ...
1
vote
0answers
45 views

CORS problem in Lightning

My Lightning component makes 'GET' callouts for two different URLs of the same service. For one it goes correct each time: https://cors-anywhere.herokuapp.com/https://integration.visma.net/API/...
1
vote
2answers
166 views

How do I get correct base64 data present in VersionData field in ContentVersion through jsforce?

I am using jsforce to query VersionData field in ContentVersion object. However, it returns me the URL to the base64 data instead of the actual data. If I make a GET request to the URL (using the ...
3
votes
1answer
60 views

How to use a Named Credential for custom authentication that needs more than username, password to generate a secure token(X-Auth-Token)?

Premise We're currently storing the following parameters used for integration with a home grown web service: username password tokenKey initVector The below code is used to generate an ...
0
votes
0answers
29 views

For loop and insertData with ssjs

Anyone experience with using for loops to insert data into a data extension dynamically? I normal javascript I would use a forEach statement. I have the following JSON array (retrieved using HTTPGet) ...
1
vote
0answers
37 views

INVALID_TYPE ERROR while querying using REST API

I'm trying to run a query using REST API (RestSharp). This is my query: [SELECT Id FROM Account] This is my code: RestClient m_Client = new RestClient("https://my_instance.salesforce.com"); string ...
0
votes
0answers
40 views

How to pass Username and password of Named Credentials in HTTP Get [duplicate]

I am trying to send an send a request using get method of HTTP Request and I need to pass the username and password of Named credentials in the URL as username as clientID and password as the client ...
0
votes
1answer
54 views

How to do basic auth to acces external url and advoid System.HttpResponse[Status=Forbidden, StatusCode=403]

I have a basic auth which I have working with Postman but when I do this with apex I get an Forbidden error. The variables userKeyVal and userSecretVal are filled correctly, my url is correct and I ...
0
votes
1answer
36 views

Fetching data from Tempo API fails [closed]

I am trying to fetch data from Tempo API. I added and enabled Tempo URL in Remote Site settings. Now I am making a query to their API and it fails with error Unable to tunnel through proxy. Proxy ...
1
vote
1answer
105 views

Issue getting public key, getting 400 Bad Request using JWT+OAuth while integrating salesforce with Box.com [closed]

I am trying to get access token from box.com. For this I created a custom app that uses OAuth and JWT. I have also created a self signed certificate in salesforce. This self signed certificate is used ...
0
votes
2answers
275 views

HTTP callout to SOAP webservice

I am referring this trailhead unit which has below text- Apex callouts come in two flavors. Web service callouts to SOAP web services use XML, and typically require a WSDL document for code ...
0
votes
0answers
45 views

Issue rewriting @future method to using continuation class

Formerly, I built a callout using the @future(callout=true) to make asynchronous callouts. @future(callout=true) public static void exportReport(){ // create request Http http = new ...
0
votes
1answer
62 views

Test trigger who call apex method who call future method

I'm struggling to test this situation, I'm new to salesforce and I need to integrate SF with our website, whenever someone update/create/delete account on SF I should send that information to our ...
5
votes
2answers
193 views

Is there a way to make a HTTP/2 request from Salesforce Apex?

I have setup a Cloudflare Service Worker that echos the HTTP and TLS version used to connect. Service Worker code: addEventListener('fetch', event => event.respondWith( new Response( ...
0
votes
0answers
10 views

I need help for Test Apex class [duplicate]

I got 52% with this test code, Please give me some advice to improve the percentage for passing. @isTest global class BLmainMock implements HttpCalloutMock { global HTTPResponse respond(...
0
votes
1answer
35 views

Illegal assignment from List<SmartlyStreetApex> to SmartlyStreetApex error while executing code

Through JSON converter i made the following wrapper class: public class SmartlyStreetApex { public class Components { public String primary_number; public String ...
1
vote
0answers
32 views

How to download standard Salesforce attachment in javascript using XHR

We have a VF page. From that page, we are trying to download standard Salesforce attachment using XMLHttpRequest in javascript. We are doing GET request with attachment download URL as the endpoint. ...
0
votes
0answers
7 views

Apex HTTP Get request with setBody is automatically makes the callout as POST [duplicate]

I am trying to do a GET request with a JSON body. It works fine with POSTMAN but same in Apex the callout is automatically getting converted to the POST method. And if I remove the req.setBody(body); ...
0
votes
1answer
207 views

Add new picklist values to all Record Types that use this Global Value Set

I'v been used tooling API for update Global value set. but now the new picklist values i'v added doesn't display at the picklist field. I'v notice to the check box when adding new values to global ...
0
votes
0answers
29 views

Using username password callout using NameCredential

I am able to make an apex callout by passing the username and password in the request body. public class RestCallout{ private String rootPointURL ; private static HttpRequest HTTPREQUEST = new ...
2
votes
1answer
252 views

Multipart form data uploads only the first file when using HttpFormBuilder ( try with given RestEndpoint and Anonymous Apex)

I am using the same solution as Daniel provided : When I use the below method to upload file, one by one, it works fine, jpg, pdf, docx anything. But when I try to upload multiple files using the ...
0
votes
1answer
53 views

Receiving an abnormal amount of unexpected errors when calling PATCH request

I'm not sure what is causing these errors as when I single them out and run them again, they run just fine. Here is the response log: [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ...
1
vote
1answer
105 views

Cannot deserialize instance of date JSON_PARSER_ERROR when no date present while patching

I am working with a Google Apps Script to upload data into Salesforce. Everything works except I am running into this error when a date is not present in a date field, which happens only occasionally ...
2
votes
3answers
380 views

Apex HttpMethod with two possible returning types

Is it possible to make an apex httpMethod return two different kind of data type (DTOs). When I try to do : global static Object myMethod() I get this error : HttpGet methods do not support return ...
2
votes
1answer
1k views

Unable to tunnel through proxy. Proxy returns “HTTP/1.1 503 Service Unavailable”

I'm perfoming a HTTP GET callout to an external cURL connected through proxy, using Postman i get the response. However, while making callout from Salesforce, it gives the following error: System....
-1
votes
1answer
35 views

Test class for Http Request code coverage is 50 percent [duplicate]

I have a class public class myclass { @AuraEnabled public static List <Json2Apex> customerData(String startDate, String enddate){ List <Json2Apex> LSData = new List &...
0
votes
1answer
37 views

Xero Invoice - API Character limit in Apex Salesforce

I'm new to salesforce and i'm trying to Integrate Xero Invoice. While calling the API GET https://api.xero.com/api.xro/2.0/Invoices/ i've got one question in my mind that what will be the character ...
0
votes
1answer
35 views

Simultaneous HTTP Callouts from Lightning Component with a single callback

I have a case where I have to call a 3rd party's API anywhere from 1 to 5 times, and I would like to have the page have a "loading" screen until they have all completed. Ideally, I would want these ...
0
votes
0answers
108 views

Apex Callout to Rest API throws error

I need your advice on testing the integration of third party Rest API from apex like below public class Testing { public final String clientId = ‘xxxxxxxxxxxx’; public final String ...
0
votes
1answer
52 views

get the source domain from a post request

Third-party need to send Data to Salesforce using Https post request - They cant handle token access so it must be a force.com site. I referred an Apex class to the site (Without using VF page), by ...
0
votes
1answer
42 views

Testing Apex Trigger with Asynchronous HTTP Callouts

I have an apex trigger f_contactPushNotificationTrigger that should fire when a new contact is created. This trigger call f_PushNotification class used to Post data. I used @future to make this task ...
3
votes
2answers
406 views

Best Practice deserialize a JSON to avoid heap size limit

I'm sending an HTTP request to get a JSON of Students. The JSON is a complex JSON with arrays and its break into 3 objects in Salesforce. I'm using a class (JSON2APEX) to deserialize the JSON. Some ...
1
vote
2answers
293 views

Callouts using the @future annotation or Queueable

I have a contact trigger and I need to make a callout (GET) from trigger whenever the email of a contact is modified. I know I can do this from the @future in trigger, but online I see many examples ...

1
2 3 4 5
7