12 votes

Easily download SE posts as notebooks?

Here is an approach, not battle tested, YMMV. It depends on the new body_markdown parameter in the SE API responses. From there we can use whatever MD->NB tool ...
b3m2a1's user avatar
  • 46.6k
9 votes
Accepted

Bug with Json payload with diacritics for HTTPRequest

ExportString JSON produces UTF8 encoded json string, if put as HTTPRequest body it will undergo another encoding unless you prevent it with an option: ...
Kuba's user avatar
  • 136k
9 votes
Accepted

How to import a ByteArray from GenerateHTTPResponse?

One needs to be careful and construct the HTTPResponse properly before we ask GenerateHTTPRespone to produce the final thing so ...
PlatoManiac's user avatar
  • 14.6k
8 votes
Accepted

"Accept" header in HTTP request for DOI Content Negotiation

It seems you are trying to profit from DOI Content Negotiation described here. Content negotiation allows a user to request a particular representation of a web resource. DOI resolvers use ...
rhermans's user avatar
  • 36.2k
8 votes

Bug with Json payload with diacritics for HTTPRequest

I've had luck using the functions WriteRawJSONString and ReadRawJSONString from Developer ...
chuy's user avatar
  • 10.8k
6 votes

How can I find what UserAgent gets attached to my URL requests?

If you have the ability to CloudDeploy functions, you can do it like so: ...
Carl Lange's user avatar
6 votes
Accepted

How to get URL request response in Mathematica?

It looks like this particular request requires you to set a header or two before it will respond the same way it does in the browser. In particular, it looks like it needs you to set the ...
Carl Lange's user avatar
6 votes
Accepted

Curl analog with URLRead/Execute?

To keep this example self-contained, we will use the HTTP introspection service at https://httpbin.org. This is a very handy site for verifying and debugging HTTP transactions. First we will create a ...
WReach's user avatar
  • 68.4k
5 votes
Accepted

Basic API Key authentication not working with URLExecute

We will generate our own Authorization header, because this API uses a slightly obtuse method. The API uses what's known as "Basic Authentication", which is ...
Carl Lange's user avatar
4 votes
Accepted

Access openai with HTTPRequest but body parameters seems not function

According to Kuba's and GustavoDelfino's comments, the solution is to make sure to send a JSON body with a proper content-type header: ...
Schwarzer's user avatar
4 votes
Accepted

How can I find what UserAgent gets attached to my URL requests?

HTTPRequest[""]["Headers"] {"user-agent" -> "Wolfram HTTPClient 12.3"} or ...
Kuba's user avatar
  • 136k
4 votes
Accepted

Should HTTPRequest return the same as curl in this case

The curl request is passing the arguments as a form body, but the Mathematica expression is passing query arguments in the URL. Try changing the request property ...
WReach's user avatar
  • 68.4k
4 votes

Bug with Json payload with diacritics for HTTPRequest

For what it's worth, the issue is in how ExportString is handling the diacritics. We can see that it botches them, but the function being used under the hood doesn'...
b3m2a1's user avatar
  • 46.6k
3 votes

Accessing Nutritionix API

This request works: ...
C. E.'s user avatar
  • 70k
3 votes

"Accept" header in HTTP request for DOI Content Negotiation

...
Rohit Namjoshi's user avatar
3 votes

How can I deal with a 502 error?

Alright, I got into contact with the support for the API, and the problem was resolved on their end. Apparently, it was an error in the routers' networking configuration.
Jmeeks29ig's user avatar
  • 1,427
2 votes
Accepted

Cannot submit valid form in FormFunction

As @Kuba had commented, ImportString[#, "HTTPRequest"]& does not turn POST parameters to rules. So the property "FormRules", ...
bcegkmqs23's user avatar
2 votes

Using HTTPRequest "Method"->"PUT" with photos in AWS S3

The problem is with my content hash not matching the AWS calculated hash (as you can see in the response from AWS). I didn't figure out how to get them to match, but I found an option in the AWS ...
Eric William Smith's user avatar
2 votes
Accepted

How do I execute HTTPRequest with Binary Data?

Caveat: I do not have a SalesForce account and have not tried this code against the real site. But it works against the testing site https://httpbin.org/anything. For this example we will create ...
WReach's user avatar
  • 68.4k
1 vote
Accepted

Format of api call for Open AI chat completions endpoint

To export JSON arrays you need wrap them by list or association, like ...
Lacia's user avatar
  • 2,208
1 vote

How to obtain stock information from a website

I do not think it is possible as it looks like TradingView has blocked scraping so Import does not work. You can try the inbuilt function ...
IntroductionToProbability's user avatar
1 vote

Curl analog with URLRead/Execute?

curl is different from the built-in Curl. curl is a command-line tool and library for transferring data with URLs. This aks for a Mathematica built-in or a call to ...
Steffen Jaeschke's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible