Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [http]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
19 views

HTTPPost : Unexpected parameter encountered during deserialization: attributes

I am having the following code to insert a Case record. When I run the code using workbench I am able to insert a case record. But when I try to call the API from another sandbox I am getting Error : ...
user avatar
  • 659
-1 votes
2 answers
35 views

I have the HTTP put class and when I insert/update using postman and remove revunue date from json I get an error nullpointer exception

global with Sharing class ContractHeadersRESTAPI{ @HttpPut global static String ContractHeaderUpdate(String Name, String ContractName,String Type,String EndDate, String ExternalID,String ...
user avatar
0 votes
0 answers
45 views

How to Scan External callouts( APIs ) in OWASAP ZAP

In my environment, I have used a couple of external APIs I need to scan in OWASAP ZAP OWSAP ZAP for security review. it is possible another way to Scan Callouts Api and generate reports? I have ho ...
user avatar
0 votes
0 answers
132 views

How to pass parameters to VisualForce page with POST call from APEX

I have some custom data that I want to pass to a VisualForce page in order to render it as a PFD and then send it as an attachment via e-mail. This data is not stored in Salesforce. When trying to ...
user avatar
0 votes
1 answer
48 views

Solving issues of resSystem.HttpResponse[Status=Method Not Allowed, StatusCode=405]

Iam trying to use rest to retrive the files from one org to another org 1.To send the Id of the content version in opportunity from source org to target org 2.Target Org should get the id and store ...
user avatar
0 votes
0 answers
33 views

Files are getting corrupted when sent over http request [duplicate]

I am sending files to a third-party system through an HTTP Post request, whenever a new file is uploaded or attached under any of the Order records by writing a trigger for ContentDocumentLink Object. ...
user avatar
-2 votes
2 answers
1k views

Apex error : You have uncommitted work pending. Please commit or rollback before calling out [duplicate]

Apex error : You have uncommitted work pending. Please commit or rollback before calling out. I get the above error when I try to make two http callout one after the other and store the result in ...
user avatar
  • 11
0 votes
2 answers
256 views

Missing return statement required return type: System.HttpResponse

I'm going through this trailhead module and, as a good newbie, I'm experiencing some issues in completing the hands on challenge. This is my AnimalLocator class: public with sharing class ...
user avatar
  • 173
0 votes
1 answer
241 views

Pass trigger record values to Apex class for Http callout

I'm fairly new to custom development/coding in general. I've created some Stock__c records in my playground and am trying to update their price using an Http callout to IEX Cloud API. What I can't ...
user avatar
0 votes
1 answer
488 views

Stripe API request working with Postman but failing with Apex Rest Callout

I'm trying to make a callout to a Stripe Api with Apex. I made the exactly same request in Postman with the same Http configuration and have this working well. But when running it with Apex i get a ...
user avatar
1 vote
0 answers
77 views

Parsing of Json response from Tooling API code [duplicate]

Please have a look through the attached debug log Below is my code:- Apex Class:- Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint(Url....
user avatar
0 votes
1 answer
782 views

Create a test class for RestResource class with a response code

I have a @RestResource class which receives data from a third party, finds the matching record and updates it, then returns a success/fail to the third party. I've just added the RestContext.response ...
user avatar
  • 1,387
6 votes
1 answer
1k views

Can we Have two Http Mock Callouts in a single test class method

In My Method making two callouts in a single transaction Get Access Token For that API --> GetAccessToken Execute Payment When i ran the test class getting following error 08:50:00:839 ...
user avatar
2 votes
1 answer
74 views

Help with Rest Resource

I'm working with integrations rn, and I'm stuck... I need to create a public site to receive calls fired by a third-party system. I'm using this tutorial: http://www.wadewegner.com/2013/03/creating-...
user avatar
  • 107
1 vote
1 answer
474 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/...
user avatar
  • 213
2 votes
0 answers
204 views

Getting status code 400 Bad Request when making HTTP request to shopify

I'm relatively new to SF/APEX, but a developer of 15 years so I'm pretty well versed in making a HTTP request. For whatever reason, I can't accomplish this using APEX. When I try to make a simple ...
user avatar
  • 121
0 votes
1 answer
2k views

Json generator with list of records from Salesforce

I'm new in Apex and we have requirement, I need to send a record from salesforce to external system using Rest API whenever a record is created in Salesforce, I need to send couple of SF fields to ...
user avatar
1 vote
1 answer
635 views

Delete/Update Global Value Set values using Tooling API

I'm trying to update or delete values in my Global Value Set. I succeed insert new values with the code below: but when I change SetMethod to DELETE I get Bad Request with status code 400 is there ...
user avatar
  • 13
1 vote
1 answer
108 views

What is the difference between callout and HTTP request? [closed]

I don't quite understand those concepts. Are they the same?
user avatar
5 votes
2 answers
1k views

Are there any external call out limits in Marketing Cloud?

I would like to run an SSJS script which makes callouts to a third party system (which sends WhatsApp messages). As this action will happen frequently I would like to know if there are any limits I ...
user avatar
2 votes
1 answer
149 views

Auth errors and callout errors in Scratch org

I have an app that makes API Rest calls to my cratch org. Till yesterday everything was working fine. Yesterday I have configured scheduled apex class job to run in the night. But when checked the ...
user avatar
  • 23
1 vote
0 answers
167 views

setting a large http body

I am trying to send a http request with a large string Body; however, salesforce complaints about the size of the string, the error as follows: caused by: System.StringException: String length ...
user avatar
  • 1,410
1 vote
1 answer
358 views

Error when pulling PDF from HTTP response

I have a question regarding this post: handle PDF content in HTTP callout When I try the above code I'm getting this: "Unrecognized base64 character: %" The logs show this as well: 19:53:04:658 ...
user avatar
  • 13
1 vote
1 answer
1k views

SSJS HTTP Get method error - Unable to retrieve security descriptor for this frame

I am trying to retrieve a template-based email asset using the Content Builder API via a Cloud page. I am having trouble retrieving the template. I am not sure if it is an issue with the structure of ...
user avatar
0 votes
1 answer
202 views

not able to access the variable values after using the continuation class

private class StateInfo { Account acc {get; set;} StateInfo(Account acc){ this.acc = acc; } Contact cont {get; set;} StateInfo(Account acc, ...
user avatar
  • 261
1 vote
0 answers
126 views

Rest API callout using basic authorisation

String filter = 'OrderNumber eq \'1000035\' and SoldtoCustomer eq \'10045005\''; String Username = user; String Password = pass; String expand = 'EvLineDetailsSet'; String format ='...
user avatar
1 vote
0 answers
82 views

Failed to get success response in “application/json” using Name Credential

HttpResponse in “text/html” instead in “application/json” if using Name Credential Step1 : Name Credential Step 2: Authentication & Authorization Code RESPONSE header>>>>>: ...
user avatar
0 votes
1 answer
1k views

HttpResponse with status code 0 [closed]

I am using an API to get some response. When I check my HttpResponse. It is like this: System.HttpResponse[Status=null, StatusCode=0] In what case we get such a response?
user avatar
1 vote
0 answers
156 views

Quickbooks API PDF upload error: Maximum line length limit exceeded

I'm trying to upload pdf file from Salesforce to Quickbooks attachments via Quickbooks API. It works fine with small files, but if file size exceeds 999 bytes, the following error appears: An ...
user avatar
3 votes
1 answer
1k views

REST GET API response does not contain null fields

I have written a REST API endpoint for Account object for GET operation. The code is below - @httpget global static list<Account> doget(){ RestRequest req = RestContext.request; RestResponse ...
user avatar
1 vote
0 answers
95 views

HTTPS url for Community isn't redirecting

We are about to launch our Salesforce Community. We created a custom domain and URL using this option for our domain: "Salesforce serves the domain over HTTPS, on Salesforce's servers, using your ...
user avatar
0 votes
1 answer
183 views

POST to an external API from visualforce page

I am using OpenCTI in Lightning to enable click to dial. I want to click on the phone number and call an external API to make the dial. I have a visualforce page as CTI Adapter. When the page loads ...
user avatar
  • 153
0 votes
2 answers
2k views

PATCH Issue - {"Message":"The requested resource does not support http method 'POST'."}

I have a callout that is having an issue with it's POST. I have seen a couple of work arounds for this issue but none of them seem to work with my integration. req.setMethod('POST'); req.setHeader('...
user avatar
  • 3,177
0 votes
1 answer
114 views

Is a Request possible without a Response Status?

Utilizing a custom salesforce connect adapter, callouts are being made using the HTTPRequest and HTTPResponse classes. 40,000 requests to these webservices are being made and all but a few (2-5) are ...
user avatar
  • 1,818
0 votes
1 answer
643 views

Metadata Rest API for custom objects

Is it possible to create and update custom objects using rest? I seen different questions that suggest it isn't yet available without using a client or SOAP but I need to be able to access it through ...
user avatar
0 votes
1 answer
145 views

Saleaforce IOT: ESP8266 IoT device facing 302 Http redirect instead of 201 when calling REST API because of insecure HTTPS call

ESP8266 has been able to get OAuth token by Device Flow OAuth2.0 After getting OAuth token, I was hitting the REST API endpoint /services/data/v45.0/sobjects/Account with a JSON body in the request: ...
user avatar
0 votes
2 answers
2k views

Salesforce server IP which is making callout

I have a batch process which makes a HTTP call out to third party, but because of IP restriction third party is denaying the request. Is there any way to get Salesforce server Client IP from where ...
user avatar
  • 3
2 votes
3 answers
735 views

Make http callout in batch after insert actions

I have a batch job with http callout enabled, in the execute() method, the code logic goes like: global void execute(Database.BatchableContext BC, List<Object> scope){ List<CustomObject&...
user avatar
  • 843
1 vote
0 answers
994 views

Can APEX Capture Cookies in Callout HttpResponse?

I'm trying to post data from my org to a third party using a REST API they've provided for us. The process for this is: POST client_credentials (client_id and client_secret) to obtain access_token ...
user avatar
0 votes
1 answer
1k views

Secure a Landing Page

I'm trying to have my landing Page HTTPS. In this link https://help.salesforce.com/articleView?id=mc_es_create_landing_page.htm&type=5 it's said that there's a check box where you can select the ...
user avatar
  • 1
2 votes
0 answers
925 views

"Connection reset" exception when sending a callout (HTTP.send())

We have been receiving this intermittent exception when trying to make a callout for a few months now ("Connection reset" is the exception message): Connection reset Class.Sip_HttpUtil.callout: ...
user avatar
1 vote
1 answer
5k views

Attempting to pass parameter in request.setEndpoint URL & call through Einstein chat-bot! Is this correct code?

I want to concatenate 'input' variable in the Endpoint URL. If i am passing hard-coded value like 'London', its working properly.(I am getting weather in JSON format back). I want to do it dynamically....
user avatar
0 votes
2 answers
1k views

What's wrong with my Batch Apex + Http callout get method?

I think my code is wrong. Last version of my HttpGet/Callout code (it works): How to use HttpGet service to get a list of objects and create them? Now I try to make it batch. My Execute Anonymous ...
user avatar
1 vote
4 answers
7k views

External image not displaying in community

My problem is that I cannot view an image loaded from an external site into an img tag in my lightning component. The URL is with 'http' protocol not 'https', but when I see the Chrome Console, it ...
user avatar
  • 121
1 vote
2 answers
3k views

Multiple Http Mock Callouts in a single test class

Hi so I'm trying to make a test class for my http callouts class. Now the problem is that I understand that I cannot make multiple DML and HTTP callouts in a single transaction but the third party API ...
user avatar
6 votes
2 answers
17k views

"message":"INVALID_HEADER_TYPE","errorCode":"INVALID_AUTH_HEADER" received

I am trying to call a rest resource within the same org (Because I am inserting records of an object developed by 3rd party and they strongly advised us to not do any DML directly rather they have ...
user avatar
  • 163
0 votes
1 answer
125 views

Not able to create incident from salesforce to servicenow

I tried the following code to insert incident from salesforce to ServiceNow but not sure what I am doing wrong here, Can anyone guide me what changes needed in this code or do I need to create ...
user avatar
  • 1,172
1 vote
2 answers
551 views

HTTP Callout Error using form data format

I am posting the data to endpoint url through http callouts from developer console and getting response "200 ok" and in body of response i am getting an error message of "{"IsSuccess":false,"Message":...
user avatar
  • 107
0 votes
1 answer
105 views

Convert Multile Objects to a single json

I have a list of map and list objects. These objects needs to be sent as json content in an http request. The objects are Map<String,String> leftFileParameters = new Map<String,String>()...
user avatar
  • 13
-1 votes
1 answer
425 views

Wrapper class in Http getmethod

below is my code Created a wrapper class like below public class ResponseWrapper{ public list<Account> lstaccounts; public boolean isError ; public string errorCode; public ...
user avatar
  • 23